component WebXRController { public void OnClickedButton(string LayerName, string ButtonName) { //hsSystemOutput("***layername = " + LayerName + " buttonname = " + ButtonName + "\n"); // VRモード切り替え警告 → 決定 if(LayerName == "common_dialog_enter_webxr" && ButtonName == "common_dialog_confirm") { LayerBundle layer = hsLayerGet("hud_webxr"); if(layer !== null) { layer.CallComponentMethod("WebXRViewModel", "EnterWebXRMode", ""); } LayerBundle textchatlayer = hsLayerGet("textchat_common"); if (textchatlayer !== null) { textchatlayer.CallComponentMethod("TCViewModel", "EnterWebXRMode", ""); } } // WebXRモード終了警告 → 決定 if(LayerName == "common_dialog_exit_webxr") { if (ButtonName == "common_dialog_confirm_fps") { LayerBundle layer = hsLayerGet("hud_webxr"); if (layer !== null) { layer.CallComponentMethod("WebXRViewModel", "ClickConfirmFPSCameraDialog", ""); } LayerBundle textchatlayer = hsLayerGet("textchat_common"); if (textchatlayer !== null) { textchatlayer.CallComponentMethod("TCViewModel", "ExitWebXRMode", ""); } } if (ButtonName == "common_dialog_confirm_tps") { LayerBundle layer = hsLayerGet("hud_webxr"); if (layer !== null) { layer.CallComponentMethod("WebXRViewModel", "ClickConfirmTPSCameraDialog", ""); } LayerBundle textchatlayer = hsLayerGet("textchat_common"); if (textchatlayer !== null) { textchatlayer.CallComponentMethod("TCViewModel", "ExitWebXRMode", ""); } } } if(LayerName == "camera_layer") { if(ButtonName == "camera_exit_button") { ShowHUD(); } } if(LayerName == "mainmenu_home") { if(ButtonName == "hud_camera" || ButtonName == "common_btn_close" || ButtonName == "popup_background") { ShowHUD(); } } if(LayerName == "mainmenu_start_dialog") { if(ButtonName == "start_btn_return") { ShowHUD(); } } if(LayerName == "mainmenu_mypage_avatar_base") { if(ButtonName == "config_myavatar_select" || ButtonName == "config_presetavatar_select") { ShowHUD(); } } if(LayerName == "mainmenu_setting_base") { if(ButtonName == "setting_tab_help_off") { LayerBundle layer = hsLayerGet("hud_webxr"); if(layer !== null) { layer.CallComponentMethod("WebXRViewModel", "ClickSettingTabHelpOff", ""); } } } // VRモード操作方法レイヤー if(LayerName == "tutorial_webxr") { LayerBundle layer = hsLayerGet("hud_webxr"); // 今後表示しない隣のチェックボックスOFF if(ButtonName == "btn_check_off") { if(layer !== null) { layer.CallComponentMethod("WebXRViewModel", "ClickTutorialCheckOff", ""); } } // 今後表示しない隣のチェックボックスON if(ButtonName == "btn_check_on") { if(layer !== null) { layer.CallComponentMethod("WebXRViewModel", "ClickTutorialCheckOn", ""); } } } } void ShowHUD() { if(hsSystemIsVRMode()) { hsCanvasSetLayerShow( "hud_webxr", true); } else { hsCanvasSetLayerShow( "HUD", true); } } }