Browse Source

移动场景时关闭定位识别

蓝色星空 1 year ago
parent
commit
6fc2c5265e
1 changed files with 7 additions and 0 deletions
  1. 7 0
      Assets/Scripts/Blue/Controller/SavePanel.cs

+ 7 - 0
Assets/Scripts/Blue/Controller/SavePanel.cs

@@ -9,10 +9,13 @@ public class SavePanel : AbstractController
     public Transform meshTest;
     public Transform parent;
     public SCToggleSwitch3D sCToggleSwitch3D;
+    [SerializeField] private GameObject ARMap;
     private void Start()
     {
         meshTest = GameObject.Find("ARSpaceForAll/mesh_test").gameObject.transform;
         parent = GameObject.Find("ARSpaceForAll").transform;
+        ARMap = GameObject.Find("ARSpaceForAll/AR_Map");
+        ARMap.SetActive(false);
         sCToggleSwitch3D = transform.parent.GetComponent<SCToggleSwitch3D>();
         saveBtn.onClick.AddListener(Save);
         cancleBtn.onClick.AddListener(Cancle);
@@ -46,10 +49,14 @@ public class SavePanel : AbstractController
 
     private void OnEnable()
     {
+        if(ARMap!=null)
+            ARMap.SetActive(false);
         SetSceneActive.active = true;
     }
     private void OnDisable()
     {
+        if(ARMap!=null)
+            ARMap.SetActive(true);
         SetSceneActive.active = false;
     }
 }