component WebXRController { public void OnClickedButton(string LayerName, string ButtonName) { // VRモード切り替え警告 → 決定 if(LayerName == "common_dialog_enter_webxr" && ButtonName == "common_dialog_confirm") { hsCanvasResetToggleDefault("SettingSystem_ClickToMove_Available"); hsCanvasToggleChange("SettingSystem_ClickToMove_Available"); } // WebXRモード終了警告 → 決定 if(LayerName == "common_dialog_exit_webxr") { hsCanvasResetToggleDefault("SettingSystem_ClickToMove_Available"); if (ButtonName == "common_dialog_confirm_fps") { LayerBundle layer = hsLayerGet("hud_webxr"); if (layer !== null) { layer.CallComponentMethod("WebXRViewModel", "ClickConfirmFPSCameraDialog", ""); } } if (ButtonName == "common_dialog_confirm_tps") { LayerBundle layer = hsLayerGet("hud_webxr"); if (layer !== null) { layer.CallComponentMethod("WebXRViewModel", "ClickConfirmTPSCameraDialog", ""); } } } 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", ""); } } } if(LayerName == "mainmenu_webxr" || LayerName == "mainmenu_side_home_webxr") { if(ButtonName == "hud_voice_off") { LayerBundle layer = hsLayerGet("vcc_icon_only_base"); if (layer !== null) { layer.CallComponentMethod("VCCViewModel", "ClickVoiceEnable", "true"); } } else if(ButtonName == "hud_voice_on") { LayerBundle layer = hsLayerGet("vcc_icon_only_base"); if (layer !== null) { layer.CallComponentMethod("VCCViewModel", "ClickVoiceEnable", "false"); } } else if(ButtonName == "hud_voicechat_arrow_down") { { LayerBundle layer = hsLayerGet("vcc_icon_only_base"); if(layer !== null) { layer.CallComponentMethod("VCCViewModel", "ClickArrowDown", ""); } } // TC if(hsCanvasIsPortrait()) { LayerBundle layer = hsLayerGet("textchat_common"); if(layer === null) return; layer.CallComponentMethod("TCViewModel", "CloseTextChat", ""); } } else if(ButtonName == "hud_voicechat_arrow_up") { LayerBundle layer = hsLayerGet("vcc_icon_only_base"); if(layer !== null) { layer.CallComponentMethod("VCCViewModel", "ClickArrowUp", ""); } } else if(ButtonName == "hud_voicechat_arrow_right") { LayerBundle layer = hsLayerGet("vcc_icon_only_base"); if(layer !== null) { layer.CallComponentMethod("VCCViewModel", "OpenChannelList", ""); } } else if(ButtonName == "hud_camera") { // VCC { LayerBundle layer = hsLayerGet("vcc_icon_only_base"); if(layer !== null) { layer.CallComponentMethod("VCCViewModel", "ClearAllVCCLayer", ""); } } // TC { LayerBundle layer = hsLayerGet("textchat_common"); if(layer !== null) { layer.CallComponentMethod("TCViewModel", "CloseTextChat", ""); } } } } } void ShowHUD() { if(hsSystemIsVRMode()) { hsCanvasSetLayerShow( "hud_webxr", true); } else { hsCanvasSetLayerShow( "HUD", true); } } }