蓝色星空 1 жил өмнө
parent
commit
ce9118f42c

+ 2 - 1
.gitignore

@@ -33,4 +33,5 @@
 /libopenxr_loader.so.meta
 /QCAR
 /*.sln
-/.vs
+/.vs
+/.vscode

+ 4 - 4
Assets/SDK/Modules/Module_Follower/Scripts/CameraFollower.cs

@@ -35,16 +35,16 @@ namespace SC.XR.Unity
                 {
                     float z = float.Parse(data["defaultLoginZaxis"].ToString());
                     float y = float.Parse(data["defaultLoginHeight"].ToString());
-                 
-                    z = (data["defaultLoginZaxis"].ToString() == string.Empty) ? 1 : z;
-                    y = (data["defaultLoginHeight"].ToString() == string.Empty) ? 2 : y;
+
+                    z = (string.IsNullOrEmpty(data["defaultLoginZaxis"].ToString())) ? 1 : z;
+                    y = (string.IsNullOrEmpty(data["defaultLoginHeight"].ToString())) ? 2 : y;
                     WindowDistance = z;
                     WindowOffset = new Vector2(WindowOffset.x, y);
                 }
                 else
                     Debug.LogError(" HttpTool  Get Interval Error!!! ");
             });
-           
+
             _slamHead = API_GSXR_Slam.GSXR_Get_Head();
             initViewPoint = Camera.main.WorldToViewportPoint(_slamHead.position + (_slamHead.forward * WindowDistance));
             InstantFollow();

+ 3 - 3
Assets/SDK/Modules/Module_Follower/Scripts/SCKeyboardFollower.cs

@@ -18,7 +18,7 @@ namespace SC.XR.Unity {
         float y = 0;
         private void Start()
         {
-           
+
             startScale = transform.localScale;
             HttpTool.Instance.Get("https://fat1.qulivr.com/mr-navigator/v1/", "", (string getInterval) => {
                 Debug.Log(getInterval);
@@ -31,8 +31,8 @@ namespace SC.XR.Unity {
                      z = float.Parse(data["defaultKeyboardZaxis"].ToString());
                      y = float.Parse(data["defaultKeyboardHeight"].ToString());
 
-                     z = (data["defaultKeyboardZaxis"].ToString() == string.Empty) ? 1 : z;
-                     y = (data["defaultKeyboardHeight"].ToString() == string.Empty) ? 1 : y;
+                     z = (string.IsNullOrEmpty(data["defaultKeyboardZaxis"].ToString())) ? 1 : z;
+                     y = (string.IsNullOrEmpty(data["defaultKeyboardHeight"].ToString())) ? 1 : y;
                 }
                 else
                     Debug.LogError(" HttpTool  Get Interval Error!!! ");

+ 2 - 2
Assets/Scripts/ERNIEBot/ERNIEBotManager.cs

@@ -78,8 +78,8 @@ public class ERNIEBotManager : MonoBehaviour
 
                 float z = float.Parse(data["defaultLoginZaxis"].ToString());
                 float y = float.Parse(data["defaultLoginHeight"].ToString());
-                z = (data["defaultLoginZaxis"].ToString() == string.Empty) ? 1 : z;
-                y = (data["defaultLoginHeight"].ToString() == string.Empty) ? 2 : y;
+                z = (string.IsNullOrEmpty(data["defaultLoginZaxis"].ToString())) ? 1 : z;
+                y = (string.IsNullOrEmpty(data["defaultLoginHeight"].ToString())) ? 2 : y;
                 irobotPos = new Vector3(0, y, z);
             }
             else

+ 3 - 3
Assets/Scripts/Net/HttpGetValue.cs

@@ -19,10 +19,10 @@ public class HttpGetValue : MonoBehaviour
             {
                 float z = float.Parse(data["defaultLoginZaxis"].ToString());
                 float y = float.Parse(data["defaultLoginHeight"].ToString());
-                z = (data["defaultLoginZaxis"].ToString() == string.Empty) ? 1 : z;
-                y = (data["defaultLoginHeight"].ToString() == string.Empty) ? 2 : y;
+                z = (string.IsNullOrEmpty(data["defaultLoginZaxis"].ToString())) ? 1 : z;
+                y = (string.IsNullOrEmpty(data["defaultLoginHeight"].ToString())) ? 2 : y;
 
-                transform.position += new Vector3(0, y, z); 
+                transform.position += new Vector3(0, y, z);
             }
             else
                 Debug.LogError(" HttpTool  Get Interval Error!!! ");