diff --git a/GQ_TongXin/Assets/Scenes/SampleSceneG.unity b/GQ_TongXin/Assets/Scenes/SampleSceneG.unity index 58d05f2c0..673ac7292 100644 --- a/GQ_TongXin/Assets/Scenes/SampleSceneG.unity +++ b/GQ_TongXin/Assets/Scenes/SampleSceneG.unity @@ -274143,6 +274143,18 @@ MonoBehaviour: onValueChanged: m_PersistentCalls: m_Calls: + - m_Target: {fileID: 4362348815729331935} + m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine + m_MethodName: SetActive + m_Mode: 6 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 - m_Target: {fileID: 4362348816464134982} m_TargetAssemblyTypeName: UnityEngine.GameObject, UnityEngine m_MethodName: SetActive diff --git a/GQ_TongXin/Assets/Scripts/Camera/CameraRT.cs b/GQ_TongXin/Assets/Scripts/Camera/CameraRT.cs index 090fa48da..c89e5bc04 100644 --- a/GQ_TongXin/Assets/Scripts/Camera/CameraRT.cs +++ b/GQ_TongXin/Assets/Scripts/Camera/CameraRT.cs @@ -78,13 +78,13 @@ public class CameraRT : MonoBehaviour private static void BoolMonitor_ValueChanged(object sender, EventArgs e) { //Debug.Log("当前是否不动" + BoolMonitor.Value); - if (!BoolMonitor.Value) - { - if (!string.IsNullOrEmpty(WebInteraction.Inst.current_videoNumber) && WebInteraction.Inst.isVideoPlay) - { - WebInteraction.Inst.CloseVideo(WebInteraction.Inst.current_videoNumber); - } - } + //if (!BoolMonitor.Value) + //{ + // if (!string.IsNullOrEmpty(WebInteraction.Inst.current_videoNumber) && WebInteraction.Inst.isVideoPlay) + // { + // WebInteraction.Inst.CloseVideo(WebInteraction.Inst.current_videoNumber); + // } + //} } private void Start() diff --git a/GQ_TongXin/Assets/Scripts/WJ/UIToCabinet.cs b/GQ_TongXin/Assets/Scripts/WJ/UIToCabinet.cs index bc68e1193..2a4bbe9c5 100644 --- a/GQ_TongXin/Assets/Scripts/WJ/UIToCabinet.cs +++ b/GQ_TongXin/Assets/Scripts/WJ/UIToCabinet.cs @@ -59,8 +59,10 @@ public class UIToCabinet : MonoBehaviour for (int i = 0; i < toggles.Count; i++) { var index = i; - toggles[i].onValueChanged.AddListener((ison) => + toggles[index].onValueChanged.AddListener((ison) => { + if (!toggles[index].gameObject.activeInHierarchy) + return; if (ison) { CreateLine createLine = PatternChoose.Inst.transform.Find("").GetComponent(); @@ -291,6 +293,7 @@ public class UIToCabinet : MonoBehaviour /// public void UI_init() { + WebInteraction.Inst.CloseVideo(WebInteraction.Inst.current_videoNumber); GameManager.Inst.power_close(); if (GameManager.Inst.objectToShow_add.activeSelf) diff --git a/GQ_TongXin/Assets/script/摄像头/LensUI.cs b/GQ_TongXin/Assets/script/摄像头/LensUI.cs index 8276f946e..9c8484cd2 100644 --- a/GQ_TongXin/Assets/script/摄像头/LensUI.cs +++ b/GQ_TongXin/Assets/script/摄像头/LensUI.cs @@ -22,7 +22,7 @@ public class LensUI : CabinetUIBase button.onClick.AddListener(() => { var t = text.text.Replace("", ""); - if (BoolMonitor.Value) + //if (BoolMonitor.Value) { WebInteraction.Inst.current_videoNumber = t; WebInteraction.Inst.isVideoPlay = true; diff --git a/GQ_TongXin/Assets/script/相机/ExtendedFlycam.cs b/GQ_TongXin/Assets/script/相机/ExtendedFlycam.cs index 505387940..405b8ecc3 100644 --- a/GQ_TongXin/Assets/script/相机/ExtendedFlycam.cs +++ b/GQ_TongXin/Assets/script/相机/ExtendedFlycam.cs @@ -67,13 +67,13 @@ public class ExtendedFlycam : MonoBehaviour private static void BoolMonitor_ValueChanged(object sender, EventArgs e) { //Debug.Log("当前是否不动" + BoolMonitor.Value); - if (!BoolMonitor.Value) - { - if (!string.IsNullOrEmpty(WebInteraction.Inst.current_videoNumber) && WebInteraction.Inst.isVideoPlay) - { - WebInteraction.Inst.CloseVideo(WebInteraction.Inst.current_videoNumber); - } - } + //if (!BoolMonitor.Value) + //{ + // if (!string.IsNullOrEmpty(WebInteraction.Inst.current_videoNumber) && WebInteraction.Inst.isVideoPlay) + // { + // WebInteraction.Inst.CloseVideo(WebInteraction.Inst.current_videoNumber); + // } + //} } private Transform cameraTransform;