Browse Source

Merge branch 'master' into XRSDK_Rhinox

# Conflicts:
#	Samples~/SDK/Resources/ShowVersionSDK.prefab
胡佳骏 1 year ago
parent
commit
cc62129656

+ 12 - 9
Samples~/SDK/GatewayHttp.cs

@@ -15,18 +15,21 @@ public class GatewayHttp : MonoBehaviour
     // Start is called before the first frame update
     void Start()
     {
-        
+
         Debug.Log("Start Queue SendHttp Start" + Application.version);
-        Dictionary<string,string> data = new Dictionary<string, string>();
+        Dictionary<string, string> data = new Dictionary<string, string>();
         data.Add("username", username);
         data.Add("password", password);
-        StartCoroutine(SendHttp("nacos/v1/auth/users/login", data,(string json)=> {
+        StartCoroutine(SendHttp("nacos/v1/auth/users/login", data, (string json) => {
 
             Debug.Log(json);
             JsonData jdata = JsonMapper.ToObject(json);
             Dictionary<string, string> data = new Dictionary<string, string>();
-            data.Add("dataId",Application.version);
-            data.Add("group", Application.productName);
+            string pname = Application.productName.Replace(" ", "");
+            data.Add("dataId", Application.version);
+            data.Add("group", pname);
+            Debug.Log("login==>" + pname);
+            Debug.Log("login==>" + Application.version);
             data.Add("accessToken", jdata["accessToken"].ToString());
             StartCoroutine(SendHttp("nacos/v1/cs/configs", data, (string json) =>
             {
@@ -41,7 +44,7 @@ public class GatewayHttp : MonoBehaviour
                 HttpSDKAction.Instance.officeSocket = backData["unity"]["url"][pt]["officeSocket"].ToString();
                 HttpSDKAction.Instance.pointCloudUrl = backData["unity"]["url"][pt]["pointCloud"].ToString();
                 HttpSDKAction.Instance.roomSocket = backData["unity"]["url"][pt]["roomSocket"].ToString();
-            },false));
+            }, false));
 
 
         }));
@@ -82,17 +85,17 @@ public class GatewayHttp : MonoBehaviour
         requestHeader.Add("Content-Type", "application/x-www-form-urlencoded");
     }
 
-    public IEnumerator SendHttp(string methodName, Dictionary<string, string> fromDic, Action<string> CallBack,bool isPost=true)
+    public IEnumerator SendHttp(string methodName, Dictionary<string, string> fromDic, Action<string> CallBack, bool isPost = true)
     {
         Debug.Log("Start Queue SendHttp " + methodName);
-        string url = baseUrl+ methodName;
+        string url = baseUrl + methodName;
         UnityWebRequest webRequest;
         if (!isPost)
         {
             url += "?";
             foreach (var item in fromDic)
             {
-                url+= item.Key +"="+item.Value+ "&";
+                url += item.Key + "=" + item.Value + "&";
             }
 
             webRequest = UnityWebRequest.Get(url);

+ 1 - 127
Samples~/SDK/Resources/GatewayHttp.prefab

@@ -28,8 +28,7 @@ Transform:
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
-  m_Children:
-  - {fileID: 3925532733115640648}
+  m_Children: []
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -45,128 +44,3 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 8c732834f608cd64cbdb9615e27dd9a2, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
---- !u!1001 &9165859205490109733
-PrefabInstance:
-  m_ObjectHideFlags: 0
-  serializedVersion: 2
-  m_Modification:
-    m_TransformParent: {fileID: 6211819728071592437}
-    m_Modifications:
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_Pivot.x
-      value: 0.5
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_Pivot.y
-      value: 0.5
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_RootOrder
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_AnchorMax.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_AnchorMax.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_AnchorMin.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_AnchorMin.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_SizeDelta.x
-      value: 1030.5
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_SizeDelta.y
-      value: 532
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_LocalPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_LocalPosition.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_LocalPosition.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_LocalRotation.w
-      value: 0.7071068
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_LocalRotation.x
-      value: 0.7071068
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_LocalRotation.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_LocalRotation.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_AnchoredPosition.x
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_AnchoredPosition.y
-      value: -1.6
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_LocalEulerAnglesHint.x
-      value: 90
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_LocalEulerAnglesHint.y
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_LocalEulerAnglesHint.z
-      value: 0
-      objectReference: {fileID: 0}
-    - target: {fileID: 5281006414418790001, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-        type: 3}
-      propertyPath: m_Name
-      value: ShowVersionSDK
-      objectReference: {fileID: 0}
-    m_RemovedComponents: []
-  m_SourcePrefab: {fileID: 100100000, guid: e58fc4d61432f9d4ba7d054aed8c1378, type: 3}
---- !u!224 &3925532733115640648 stripped
-RectTransform:
-  m_CorrespondingSourceObject: {fileID: 5281006414418789997, guid: e58fc4d61432f9d4ba7d054aed8c1378,
-    type: 3}
-  m_PrefabInstance: {fileID: 9165859205490109733}
-  m_PrefabAsset: {fileID: 0}

+ 0 - 13
Samples~/SDK/Resources/ShowVersionSDK.prefab

@@ -11,7 +11,6 @@ GameObject:
   - component: {fileID: 5281006414099219077}
   - component: {fileID: 5281006414099219079}
   - component: {fileID: 5281006414099219078}
-  - component: {fileID: 5281006414099219072}
   m_Layer: 5
   m_Name: Version
   m_TagString: Untagged
@@ -81,18 +80,6 @@ MonoBehaviour:
     m_VerticalOverflow: 1
     m_LineSpacing: 1
   m_Text: New Text
---- !u!114 &5281006414099219072
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 5281006414099219076}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 36664d1f74a57a34b82f131fb947d535, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
 --- !u!1 &5281006414418790001
 GameObject:
   m_ObjectHideFlags: 0