Browse Source

修改ControlLocalizer脚本,使用XRLocalizer

蓝色星空 1 year ago
parent
commit
b75e0c16b8
2 changed files with 4 additions and 45 deletions
  1. 1 36
      Assets/NavigatorPro.unity
  2. 3 9
      Assets/Script/ControlLocalizer.cs

File diff suppressed because it is too large
+ 1 - 36
Assets/NavigatorPro.unity


+ 3 - 9
Assets/Script/ControlLocalizer.cs

@@ -1,12 +1,10 @@
-using Immersal.AR.Nreal;
-using System.Collections.Generic;
+using Immersal.AR;
 using UnityEngine;
 
 public class ControlLocalizer: MonoBehaviour
 {
-    public NRLocalizer NRLocalizer;
+    public XRLocalizer XRLocalizer;
     public GameObject irobot;
-    public List<GameObject> list = new List<GameObject>();
 
     private float time = 0f;
 
@@ -17,15 +15,11 @@ public class ControlLocalizer: MonoBehaviour
 
         if(time > 2  && (irobot.activeSelf || first))
         {
-            NRLocalizer.Localize();
+            XRLocalizer.Localize();
             time= 0;
             if (!first)
             {
                 first = true;
-                foreach(GameObject go in list)
-                {
-                    go.SetActive(true);
-                }
             }
         }
     }

Some files were not shown because too many files changed in this diff