diff --git a/Assets/Scripts/UI/UICameraSwitch.cs b/Assets/Scripts/UI/UICameraSwitch.cs index 1f3d5451..e63756f0 100644 --- a/Assets/Scripts/UI/UICameraSwitch.cs +++ b/Assets/Scripts/UI/UICameraSwitch.cs @@ -66,11 +66,11 @@ namespace QFramework.Example if (string.IsNullOrEmpty(mData.isOn)) { - if (Near.isOn) + if (Near.isOn && Near.gameObject.activeSelf) { SetNear(); } - if (Far.isOn) + if (Far.isOn && Far.gameObject.activeSelf) { SetNormal(); }