Browse Source

Merge branch 'F/0710_2.1+2.0' of ssh://gogs.ghz-tech.com:30979/GHzGlass/GHZMRNavigatorProXR into F/0710_2.1+2.0

DGJ 1 year ago
parent
commit
8a414f678a

+ 2 - 2
Assets/2.0/Tools/DownLoadItem.cs

@@ -61,10 +61,10 @@ public class DownLoadItem : MonoBehaviour
 
     public System.Collections.IEnumerator DownloadFile()
     {
-        string url = HttpAction.baseurl + HttpAction.file_download;
+        string url = HttpAction.Instance.baseurl + HttpAction.file_download;
         if (UserInfo.Instance.is20)
         {
-            url = HttpAction.baseurl20 + HttpAction.file_download;
+            url = HttpAction.Instance.baseurl20 + HttpAction.file_download;
         }
         Debug.Log(" 当前下载>>>>     " + url + "   " + downLoadPath);
         using (webRequest = new UnityWebRequest(url, UnityWebRequest.kHttpVerbPOST))

+ 71 - 12
Assets/2.0/Tools/HttpAction.cs

@@ -1,26 +1,85 @@
+using LitJson;
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 
 public class HttpAction :Singleton<HttpAction>
 {
+    public string officeport
+    {
+        get
+        {
+            try
+            {
 
+                if (HttpSDKAction.Instance.jsonData != "")
+                {
+                    string pt = "pro";
+                #if UNITY_EDITOR
+                         pt = "dev";
+                #endif
+                    JsonData data = JsonMapper.ToObject(HttpSDKAction.Instance.jsonData);
+                    if (data["unity"]["url"][pt] != null)
+                    {
+                        return data["unity"]["url"][pt]["officePort"].ToString();
+                    }
+                    else
+                    {
 
-    //  private string baseUrl = "http://office.ghz-tech.com:3425/guideSystem";
-    public const string UrlPointCloud = "https://pro.qulivr.com/mr-navigator/v1";
-    //private string token = "";
-   // public const string baseurl = "http://office.ghz-tech.com:9904/api";
- //   public const string baseurl20 = "https://office.ghz-tech.com:3424/api";
-    public const string baseurvideo = "https://office.ghz-tech.com:3424/";
+                        return "1883";
+                    }
+                }
+                else
+                {
 
-    //public const string baseurl20 = "https://api-fat2.ghz-tech.com/mr-navigator/v1";
-    //public const string baseurl = "https://api-fat2.ghz-tech.com/mr-navigator/v1";
+                    return "1883";
+                }
+            }
+            catch
+            {
+                return "1883";
 
-    public const string baseurl20 = "https://api-fat2.ghz-tech.com/mr-navigator/v1";
-    public const string baseurl = "https://api-fat2.ghz-tech.com/mr-navigator/v1";
+            }
+        }
+    }
+    public string mqtturl
+    {
+        get
+        {
+            if (HttpSDKAction.Instance.officeSocket == "")
+            {
+                HttpSDKAction.Instance.officeSocket = "api-fat1.ghz-tech.com";
+            }
+            return HttpSDKAction.Instance.officeSocket;
+        }
+    }
+
+    public string baseurl20
+    {
+        get
+        {
+            if (HttpSDKAction.Instance.loginUrl == "")
+            {
+                HttpSDKAction.Instance.loginUrl = "https://api-fat2.ghz-tech.com/mr-navigator/v1";
+            }
+            return HttpSDKAction.Instance.loginUrl;
+        }
+    }
+    
+
+
+    public  string baseurl
+            {
+        get
+        {
+            if (HttpSDKAction.Instance.loginUrl == "")
+            {
+                HttpSDKAction.Instance.loginUrl = "https://api-fat2.ghz-tech.com/mr-navigator/v1";
+            }
+            return HttpSDKAction.Instance.loginUrl;
+        }
+    }
 
-    //public const string baseurl20 = "http://192.168.50.114:8888/mr-navigator/v1";
-    //public const string baseurl = "http://192.168.50.114:8888/mr-navigator/v1";
     //初始化场景
     public const string client_snInfo = "/client/snInfo";
 

+ 0 - 8
Assets/AVProPlayer.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: a645ecf929262664ebff3f1793d1416d
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 1 - 1
Assets/COSScripts/DownloadResManager.cs

@@ -39,7 +39,7 @@ public class DownloadResManager : MonoSingleton<DownloadResManager>
         listFaildMaterial = new List<DownLoadMaterial>();
         qDownload = new Queue<DownLoadMaterial>();
 
-      //  PlayerPrefs.DeleteAll();
+       // PlayerPrefs.DeleteAll();
         //先判断是否存在,再创建
         if (!File.Exists(path + "CompletedMaterial.txt"))
         {

+ 0 - 8
Assets/GHZSDK.meta

@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: 61f82d14356979e49b907c7141aff38f
-folderAsset: yes
-DefaultImporter:
-  externalObjects: {}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 188 - 188
Assets/MRNavigatorPro.unity

@@ -38,7 +38,7 @@ RenderSettings:
   m_ReflectionIntensity: 1
   m_CustomReflection: {fileID: 0}
   m_Sun: {fileID: 705507994}
-  m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
+  m_IndirectSpecularColor: {r: 0.44402242, g: 0.49316543, b: 0.5722324, a: 1}
   m_UseRadianceAmbientProbe: 0
 --- !u!157 &3
 LightmapSettings:
@@ -1405,6 +1405,170 @@ Transform:
   m_Father: {fileID: 0}
   m_RootOrder: 20
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!43 &255444783
+Mesh:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: 
+  serializedVersion: 10
+  m_SubMeshes:
+  - serializedVersion: 2
+    firstByte: 0
+    indexCount: 0
+    topology: 5
+    baseVertex: 0
+    firstVertex: 0
+    vertexCount: 0
+    localAABB:
+      m_Center: {x: 0, y: 0, z: 0}
+      m_Extent: {x: 0, y: 0, z: 0}
+  m_Shapes:
+    vertices: []
+    shapes: []
+    channels: []
+    fullWeights: []
+  m_BindPose: []
+  m_BoneNameHashes: 
+  m_RootBoneNameHash: 0
+  m_BonesAABB: []
+  m_VariableBoneCountWeights:
+    m_Data: 
+  m_MeshCompression: 0
+  m_IsReadable: 1
+  m_KeepVertices: 0
+  m_KeepIndices: 0
+  m_IndexFormat: 1
+  m_IndexBuffer: 
+  m_VertexData:
+    serializedVersion: 3
+    m_VertexCount: 0
+    m_Channels:
+    - stream: 0
+      offset: 0
+      format: 0
+      dimension: 3
+    - stream: 0
+      offset: 0
+      format: 0
+      dimension: 0
+    - stream: 0
+      offset: 0
+      format: 0
+      dimension: 0
+    - stream: 0
+      offset: 0
+      format: 0
+      dimension: 0
+    - stream: 0
+      offset: 0
+      format: 0
+      dimension: 0
+    - stream: 0
+      offset: 0
+      format: 0
+      dimension: 0
+    - stream: 0
+      offset: 0
+      format: 0
+      dimension: 0
+    - stream: 0
+      offset: 0
+      format: 0
+      dimension: 0
+    - stream: 0
+      offset: 0
+      format: 0
+      dimension: 0
+    - stream: 0
+      offset: 0
+      format: 0
+      dimension: 0
+    - stream: 0
+      offset: 0
+      format: 0
+      dimension: 0
+    - stream: 0
+      offset: 0
+      format: 0
+      dimension: 0
+    - stream: 0
+      offset: 0
+      format: 0
+      dimension: 0
+    - stream: 0
+      offset: 0
+      format: 0
+      dimension: 0
+    m_DataSize: 0
+    _typelessdata: 
+  m_CompressedMesh:
+    m_Vertices:
+      m_NumItems: 0
+      m_Range: 0
+      m_Start: 0
+      m_Data: 
+      m_BitSize: 0
+    m_UV:
+      m_NumItems: 0
+      m_Range: 0
+      m_Start: 0
+      m_Data: 
+      m_BitSize: 0
+    m_Normals:
+      m_NumItems: 0
+      m_Range: 0
+      m_Start: 0
+      m_Data: 
+      m_BitSize: 0
+    m_Tangents:
+      m_NumItems: 0
+      m_Range: 0
+      m_Start: 0
+      m_Data: 
+      m_BitSize: 0
+    m_Weights:
+      m_NumItems: 0
+      m_Data: 
+      m_BitSize: 0
+    m_NormalSigns:
+      m_NumItems: 0
+      m_Data: 
+      m_BitSize: 0
+    m_TangentSigns:
+      m_NumItems: 0
+      m_Data: 
+      m_BitSize: 0
+    m_FloatColors:
+      m_NumItems: 0
+      m_Range: 0
+      m_Start: 0
+      m_Data: 
+      m_BitSize: 0
+    m_BoneIndices:
+      m_NumItems: 0
+      m_Data: 
+      m_BitSize: 0
+    m_Triangles:
+      m_NumItems: 0
+      m_Data: 
+      m_BitSize: 0
+    m_UVInfo: 0
+  m_LocalAABB:
+    m_Center: {x: 0, y: 0, z: 0}
+    m_Extent: {x: 1.7014117e+38, y: 1.7014117e+38, z: 1.7014117e+38}
+  m_MeshUsageFlags: 0
+  m_BakedConvexCollisionMesh: 
+  m_BakedTriangleCollisionMesh: 
+  m_MeshMetrics[0]: 1
+  m_MeshMetrics[1]: 1
+  m_MeshOptimizationFlags: 1
+  m_StreamData:
+    serializedVersion: 2
+    offset: 0
+    size: 0
+    path: 
 --- !u!1 &260758062
 GameObject:
   m_ObjectHideFlags: 0
@@ -2247,7 +2411,7 @@ MeshFilter:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 375338274}
-  m_Mesh: {fileID: 1656011052}
+  m_Mesh: {fileID: 255444783}
 --- !u!114 &375338278
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -6525,7 +6689,7 @@ PrefabInstance:
     - target: {fileID: 2656584712679981451, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: -0.0051413113
+      value: -0.005164139
       objectReference: {fileID: 0}
     - target: {fileID: 2656584712838976906, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
@@ -6655,37 +6819,37 @@ PrefabInstance:
     - target: {fileID: 2656584713474595953, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: -0.0019156551
+      value: -0.0019186999
       objectReference: {fileID: 0}
     - target: {fileID: 2656584713571100915, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchorMax.y
-      value: 1
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 2656584713571100915, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchorMin.y
-      value: 1
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 2656584713571100915, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_SizeDelta.x
-      value: 188
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 2656584713571100915, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_SizeDelta.y
-      value: 61
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 2656584713571100915, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchoredPosition.x
-      value: 100
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 2656584713571100915, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: -101.5
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 2656584714058937656, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
@@ -6695,62 +6859,62 @@ PrefabInstance:
     - target: {fileID: 2656584714091092633, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchorMax.y
-      value: 1
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 2656584714091092633, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchorMin.y
-      value: 1
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 2656584714091092633, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_SizeDelta.x
-      value: 188
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 2656584714091092633, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_SizeDelta.y
-      value: 61
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 2656584714091092633, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchoredPosition.x
-      value: 100
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 2656584714091092633, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: -35.5
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 3618627243639674965, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchorMax.y
-      value: 1
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 3618627243639674965, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchorMin.y
-      value: 1
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 3618627243639674965, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_SizeDelta.x
-      value: 188
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 3618627243639674965, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_SizeDelta.y
-      value: 61
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 3618627243639674965, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchoredPosition.x
-      value: 100
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 3618627243639674965, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: -35.5
+      value: 0
       objectReference: {fileID: 0}
     m_RemovedComponents: []
   m_SourcePrefab: {fileID: 100100000, guid: 3e8996c442fe40541beb734ca45f2bf6, type: 3}
@@ -7464,170 +7628,6 @@ GameObject:
     type: 3}
   m_PrefabInstance: {fileID: 8019606655629294614}
   m_PrefabAsset: {fileID: 0}
---- !u!43 &1656011052
-Mesh:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_Name: 
-  serializedVersion: 10
-  m_SubMeshes:
-  - serializedVersion: 2
-    firstByte: 0
-    indexCount: 0
-    topology: 5
-    baseVertex: 0
-    firstVertex: 0
-    vertexCount: 0
-    localAABB:
-      m_Center: {x: 0, y: 0, z: 0}
-      m_Extent: {x: 0, y: 0, z: 0}
-  m_Shapes:
-    vertices: []
-    shapes: []
-    channels: []
-    fullWeights: []
-  m_BindPose: []
-  m_BoneNameHashes: 
-  m_RootBoneNameHash: 0
-  m_BonesAABB: []
-  m_VariableBoneCountWeights:
-    m_Data: 
-  m_MeshCompression: 0
-  m_IsReadable: 1
-  m_KeepVertices: 0
-  m_KeepIndices: 0
-  m_IndexFormat: 1
-  m_IndexBuffer: 
-  m_VertexData:
-    serializedVersion: 3
-    m_VertexCount: 0
-    m_Channels:
-    - stream: 0
-      offset: 0
-      format: 0
-      dimension: 3
-    - stream: 0
-      offset: 0
-      format: 0
-      dimension: 0
-    - stream: 0
-      offset: 0
-      format: 0
-      dimension: 0
-    - stream: 0
-      offset: 0
-      format: 0
-      dimension: 0
-    - stream: 0
-      offset: 0
-      format: 0
-      dimension: 0
-    - stream: 0
-      offset: 0
-      format: 0
-      dimension: 0
-    - stream: 0
-      offset: 0
-      format: 0
-      dimension: 0
-    - stream: 0
-      offset: 0
-      format: 0
-      dimension: 0
-    - stream: 0
-      offset: 0
-      format: 0
-      dimension: 0
-    - stream: 0
-      offset: 0
-      format: 0
-      dimension: 0
-    - stream: 0
-      offset: 0
-      format: 0
-      dimension: 0
-    - stream: 0
-      offset: 0
-      format: 0
-      dimension: 0
-    - stream: 0
-      offset: 0
-      format: 0
-      dimension: 0
-    - stream: 0
-      offset: 0
-      format: 0
-      dimension: 0
-    m_DataSize: 0
-    _typelessdata: 
-  m_CompressedMesh:
-    m_Vertices:
-      m_NumItems: 0
-      m_Range: 0
-      m_Start: 0
-      m_Data: 
-      m_BitSize: 0
-    m_UV:
-      m_NumItems: 0
-      m_Range: 0
-      m_Start: 0
-      m_Data: 
-      m_BitSize: 0
-    m_Normals:
-      m_NumItems: 0
-      m_Range: 0
-      m_Start: 0
-      m_Data: 
-      m_BitSize: 0
-    m_Tangents:
-      m_NumItems: 0
-      m_Range: 0
-      m_Start: 0
-      m_Data: 
-      m_BitSize: 0
-    m_Weights:
-      m_NumItems: 0
-      m_Data: 
-      m_BitSize: 0
-    m_NormalSigns:
-      m_NumItems: 0
-      m_Data: 
-      m_BitSize: 0
-    m_TangentSigns:
-      m_NumItems: 0
-      m_Data: 
-      m_BitSize: 0
-    m_FloatColors:
-      m_NumItems: 0
-      m_Range: 0
-      m_Start: 0
-      m_Data: 
-      m_BitSize: 0
-    m_BoneIndices:
-      m_NumItems: 0
-      m_Data: 
-      m_BitSize: 0
-    m_Triangles:
-      m_NumItems: 0
-      m_Data: 
-      m_BitSize: 0
-    m_UVInfo: 0
-  m_LocalAABB:
-    m_Center: {x: 0, y: 0, z: 0}
-    m_Extent: {x: 1.7014117e+38, y: 1.7014117e+38, z: 1.7014117e+38}
-  m_MeshUsageFlags: 0
-  m_BakedConvexCollisionMesh: 
-  m_BakedTriangleCollisionMesh: 
-  m_MeshMetrics[0]: 1
-  m_MeshMetrics[1]: 1
-  m_MeshOptimizationFlags: 1
-  m_StreamData:
-    serializedVersion: 2
-    offset: 0
-    size: 0
-    path: 
 --- !u!1 &1662148595
 GameObject:
   m_ObjectHideFlags: 0
@@ -10008,7 +10008,7 @@ PrefabInstance:
     - target: {fileID: 486518953982833418, guid: 6693e68f506a6c944b1783fb7e52a498,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: -0.0012308005
+      value: -0.0012594479
       objectReference: {fileID: 0}
     - target: {fileID: 486518953989235048, guid: 6693e68f506a6c944b1783fb7e52a498,
         type: 3}
@@ -13854,7 +13854,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 1, y: 1}
-  m_AnchoredPosition: {x: 0, y: -0.003890887}
+  m_AnchoredPosition: {x: 0, y: -0.0050892155}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0, y: 1}
 --- !u!114 &1180406930876628118

+ 1 - 2
Assets/Resources/Template/Prefab/Video.prefab

@@ -1242,7 +1242,6 @@ MonoBehaviour:
   canTwoHandScale: 0
   minScaleRatio: 0.5
   maxScaleRatio: 3
-  isParentDrag: 0
 --- !u!114 &175833524124856625
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -1966,7 +1965,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   Icon: {fileID: 7783334408191734234}
   m_IsPlaying: 0
-  m_Video: {fileID: 0}
+  m_Video: {fileID: 1373276779804712702}
   spid: 
   videoid: 
 --- !u!114 &1373276779804712702

+ 1 - 1
Assets/Script/MQTTClient.cs

@@ -142,7 +142,7 @@ public class MQTTClient : MonoSingleton<MQTTClient>
             rid = front+UserInfo.Instance.Account + "_Phone";
         }
         DisConnect();
-        qt = new QTTManager(front+id, username, password);
+        qt = new QTTManager(front+id, username, password, HttpAction.Instance.mqtturl, HttpAction.Instance.officeport);
         qt.Connect();
         StartCoroutine(Reconnection());
         qt.ConnectionFailed += onFaild;

+ 2 - 0
Assets/Scripts/LayoutGroup/DRFanLayout.cs

@@ -37,6 +37,7 @@ public class DRFanLayout : MonoBehaviour
                     var pVideo = ResMgr.Instance.Load<GameObject>("Template/Prefab/Video");
                     go = Instantiate(pVideo, par.transform);
                     var videoitem = go.AddComponent<TemplateVideo>();
+                    videoitem.autoplay = materialObls.autoplay;
                     go.SetActive(true);
                     videoitem.SetData(mat, materialObls.updateTime);
                     noText.Add(videoitem);
@@ -147,6 +148,7 @@ public class DRFanLayout : MonoBehaviour
                     var pVideo = ResMgr.Instance.Load<GameObject>("Template/Prefab/Video");
                     go = Instantiate(pVideo, par.transform);
                     var videoitem = go.AddComponent<TemplateVideo>();
+                    videoitem.autoplay = materialObls.autoplay;
                     go.SetActive(true);
                     //   videoitem.SetData(mat, materialObls.updateTime);
                     noText.Add(videoitem);

+ 3 - 1
Assets/Scripts/LayoutGroup/DRTitleLayout.cs

@@ -46,7 +46,8 @@ public class DRTitleLayout : MonoBehaviour
                     var pVideo = ResMgr.Instance.Load<GameObject>("Template/Prefab/Video");
                     go = Instantiate(pVideo, par.transform);
                     var videoitem = go.AddComponent<TemplateVideo>();
-                    go.SetActive(true);
+                        videoitem.autoplay = materialObls.autoplay;
+                        go.SetActive(true);
                     videoitem.SetData(mat, materialObls.updateTime);
                     noText.Add(videoitem);
                     break;
@@ -178,6 +179,7 @@ public class DRTitleLayout : MonoBehaviour
                         var pVideo = ResMgr.Instance.Load<GameObject>("Template/Prefab/Video");
                         go = Instantiate(pVideo, par.transform);
                         var videoitem = go.AddComponent<TemplateVideo>();
+                        videoitem.autoplay = materialObls.autoplay;
                         go.SetActive(true);
                       //  videoitem.SetData(mat, materialObls.updateTime);
                         noText.Add(videoitem);

+ 2 - 0
Assets/Scripts/LayoutGroup/SRSectorLayout.cs

@@ -43,6 +43,7 @@ public class SRSectorLayout : MonoBehaviour
                     var pVideo = ResMgr.Instance.Load<GameObject>("Template/Prefab/Video");
                     go = Instantiate(pVideo, par.transform);
                     var videoitem = go.AddComponent<TemplateVideo>();
+                    videoitem.autoplay = materialObls.autoplay;
                     go.SetActive(true);
                     videoitem.SetData(mat, materialObls.updateTime);
                     noText.Add(videoitem);
@@ -174,6 +175,7 @@ public class SRSectorLayout : MonoBehaviour
                     var pVideo = ResMgr.Instance.Load<GameObject>("Template/Prefab/Video");
                     go = Instantiate(pVideo, par.transform);
                     var videoitem = go.AddComponent<TemplateVideo>();
+                    videoitem.autoplay = materialObls.autoplay;
                     go.SetActive(true);
                     //videoitem.SetData(mat, materialObls.updateTime);
                     noText.Add(videoitem);

+ 2 - 0
Assets/Scripts/LayoutGroup/SRTitleLayout.cs

@@ -43,6 +43,7 @@ public class SRTitleLayout : MonoBehaviour
                     var pVideo = ResMgr.Instance.Load<GameObject>("Template/Prefab/Video");
                     go = Instantiate(pVideo, par.transform);
                     var videoitem = go.AddComponent<TemplateVideo>();
+                    videoitem.autoplay = materialObls.autoplay;
                     go.SetActive(true);
                     videoitem.SetData(mat, materialObls.updateTime);
                     noText.Add(videoitem);
@@ -166,6 +167,7 @@ public class SRTitleLayout : MonoBehaviour
                     var pVideo = ResMgr.Instance.Load<GameObject>("Template/Prefab/Video");
                     go = Instantiate(pVideo, par.transform);
                     var videoitem = go.AddComponent<TemplateVideo>();
+                    videoitem.autoplay = materialObls.autoplay;
                     go.SetActive(true);
                    // videoitem.SetData(mat, materialObls.updateTime);
                     noText.Add(videoitem);

+ 26 - 5
Assets/Scripts/LayoutTemplate/TemplateVideo.cs

@@ -6,8 +6,11 @@ using UnityEngine;
 
 public class TemplateVideo : BaseTemPlate
 {
+    public static bool isPlayLock;
+    public static bool isPlaying;
+    public static Queue<TemplateVideo> temQueue = new Queue<TemplateVideo>();
     private Navigator.VideoControl m_VideoCtr;
-    private AVProVideoPlayer m_Video;
+    public AVProVideoPlayer m_Video;
 
     public string localSavePath;
 
@@ -16,6 +19,16 @@ public class TemplateVideo : BaseTemPlate
 
     public bool autoplay;
 
+    private void OnDisable()
+    {
+        Debug.Log("HJJ       停止播放");
+       m_Video.Stop();
+        if (temQueue.Count>0)
+        temQueue = new Queue<TemplateVideo>();
+    }
+
+
+
     protected override void OnEnable()
     {
         //localSavePath = Application.persistentDataPath + "/Material/" + Path.GetFileName(Data.downloadPath);
@@ -30,20 +43,28 @@ public class TemplateVideo : BaseTemPlate
 
                 m_Video.SetUrl(localSavePath);
 
+
+
             }
             else
             {
                 m_Video.SetUrl(null);
             }
         }
-        if(autoplay)
+
+        if (autoplay)
         {
-            m_Video.transform.GetComponent<VideoPlayBtn>().m_IsPlaying = false;
-            m_Video.transform.GetComponent<VideoPlayBtn>().PlayVideo();
+            Debug.Log("HJJ    开始自动播放" + localSavePath);
+            temQueue.Enqueue(this);
+            //   m_Video.transform.GetComponent<VideoPlayBtn>().m_IsPlaying = false;
+            //   m_Video.transform.GetComponent<VideoPlayBtn>().PlayVideo();
 
         }
+        else
+        {
 
-
+            Debug.Log("HJJ    不需要自動播放" + localSavePath);
+        }
         setScale = true;
     }
    // private MediaPlayer MediaPlayer;

+ 27 - 0
Assets/Scripts/LayoutTemplate/VideoPlayBtn.cs

@@ -17,6 +17,9 @@ public class VideoPlayBtn : MonoBehaviour
     }
     public void PlayVideo()
     {
+        TemplateVideo.temQueue = new Queue<TemplateVideo>();
+        TemplateVideo.isPlaying = false;
+        GameManager.Instance.avplayer = null;
         Debug.Log("m_IsPlaying: " + m_IsPlaying);
         if (m_Video == null)
             return;
@@ -39,4 +42,28 @@ public class VideoPlayBtn : MonoBehaviour
             MQTTClient.Instance.sendActiveVideo(spid, videoid, m_IsPlaying, -1);
     }
 
+    public void PlayVideoAuto()
+    {
+        TemplateVideo.isPlayLock = true;
+        Debug.Log("m_IsPlaying: " + m_IsPlaying);
+        if (m_Video == null)
+            return;
+
+        Debug.Log(m_Video.GetUrl());
+        if (!m_IsPlaying)
+        {
+            // FengMian.gameObject.SetActive(false);
+            m_Video.Play();
+            Icon.SetActive(false);
+        }
+        else
+        {
+            m_Video.Pause();
+            Icon.SetActive(true);
+        }
+        m_IsPlaying = !m_IsPlaying;
+
+        if (spid != null && m_Video != null && !UserInfo.Instance.is20)
+            MQTTClient.Instance.sendActiveVideo(spid, videoid, m_IsPlaying, -1);
+    }
 }

+ 4 - 25
Assets/Scripts/Net/HttpTool.cs

@@ -36,24 +36,9 @@ public class HttpTool : MonoSingleton<HttpTool>
 
     public void Get(string methodName, Action<string> callback)
     {
-        StartCoroutine(SendHttp(methodName,"", callback,false, false));
+        StartCoroutine(SendHttp(methodName,"", callback,false));
     }
 
-    public void GetPoint(string methodName, Action<string> callback,bool isCloud=false)
-    {
-        StartCoroutine(SendHttp(methodName,"", callback,false, isCloud));
-    }
-
-    public void GetPointFile(string methodName, string projectId, string fileType, Action<string> callback)
-    {
-        string url =HttpAction.UrlPointCloud + methodName;
-        // 创建URL
-        UriBuilder uriBuilder = new UriBuilder(url);
-        // 添加查询参数
-        uriBuilder.Query = "projectId=" + projectId + "&fileType=" + fileType;
-
-        StartCoroutine(SendHttp(uriBuilder.Uri.ToString(),"", callback,false));
-    }
     public void PostTest(string methodName, string jsonString, Action<string> CallBack)
     {
         StartCoroutine(SendHttp(methodName, jsonString, CallBack));
@@ -89,7 +74,7 @@ public class HttpTool : MonoSingleton<HttpTool>
         requestHeader.Add("Content-Type", "application/json");
     }
 
-    public IEnumerator SendHttp(string methodName, string jsonString, Action<string> CallBack,bool isPost=true,bool isCloud=false)
+    public IEnumerator SendHttp(string methodName, string jsonString, Action<string> CallBack,bool isPost=true)
     {
         Debug.Log("Start Queue SendHttp " + methodName);
         string url;
@@ -99,22 +84,16 @@ public class HttpTool : MonoSingleton<HttpTool>
         }
         else
         {
-            if(isCloud)
-            {  
-                url =   HttpAction.UrlPointCloud + methodName;
-            }else
-            {
                 if(UserInfo.Instance.is20)
                 {
-                    url = HttpAction.baseurl20 + methodName;
+                    url = HttpAction.Instance.baseurl20 + methodName;
 
                 }
                 else
                 {
-                    url = HttpAction.baseurl + methodName;
+                    url = HttpAction.Instance.baseurl + methodName;
 
                 }
-            }
 
         }
         Debug.Log("URL:" + url+" isPost  "+ isPost);

+ 28 - 1
Assets/Scripts/UI/GameManager.cs

@@ -304,8 +304,31 @@ public class GameManager : MonoSingleton<GameManager>
             //m_SetBtn.transform.localPosition = API_GSXR_Slam.GSXR_Get_Head().localPosition + Player.transform.forward * 1.3f + new Vector3(0, 1f, 0);
             m_SetBtn.transform.position = OpenXRCamera.Instance.head.position + Player.transform.forward * 1.3f + new Vector3(-0.2f, 1f, 0);
         //  }
-
+        if (avplayer && !avplayer.IsPlaying()&& !TemplateVideo.isPlayLock)
+        {
+            TemplateVideo.isPlaying = false;
+            avplayer = null;
+        }
+        if(TemplateVideo.isPlayLock)
+        {
+            lockTime += Time.time;
+            if(lockTime>1)
+            {
+                TemplateVideo.isPlayLock = false;
+                lockTime = 0;
+            }
+        }
+        if (TemplateVideo.temQueue.Count>0&&!TemplateVideo.isPlaying)
+        {
+            TemplateVideo.isPlaying = true;
+            TemplateVideo video = TemplateVideo.temQueue.Dequeue();
+            video.m_Video.transform.GetComponent<VideoPlayBtn>().m_IsPlaying = false;
+            video.m_Video.transform.GetComponent<VideoPlayBtn>().PlayVideoAuto();
+            avplayer = video.m_Video;
+        }
     }
+    float lockTime = 0;
+   public  AVProVideoPlayer avplayer;
 
     public void Init()
     {
@@ -1153,6 +1176,9 @@ public class GameManager : MonoSingleton<GameManager>
         //更新编辑面板Ui
         UpdateEditorUI();
     }
+
+   
+
     /// <summary>
     /// 创建  1图片 2视频 3模型 4文字
     /// </summary>
@@ -1190,6 +1216,7 @@ public class GameManager : MonoSingleton<GameManager>
                     var pVideo = ResMgr.Instance.Load<GameObject>("Template/Prefab/Video");
                     go = Instantiate(pVideo, spoit.transform);
                     var videoitem = go.AddComponent<TemplateVideo>();
+                    videoitem.autoplay = material.autoplay;
                     go.SetActive(true);
                     videoitem.SetData(mat, material.updateTime);
                    

+ 6 - 4
Assets/Scripts/UI/LoginPanel.cs

@@ -306,10 +306,10 @@ public class LoginPanel : BaseUI
     {
 #if UNITY_EDITOR
         m_AccountStr = "4444@qq.com";
-        m_AccountStr = "jiajun.hu@ghz-tech.com";
-      //  m_AccountStr = "1768147286@qq.com";
+     //   m_AccountStr = "jiajun.hu@ghz-tech.com";
+        m_AccountStr = "1768147286@qq.com";
        // m_AccountStr = "bactest1@1.com";
-        m_AccountStr = "advtest1@1.com";
+      //  m_AccountStr = "advtest1@1.com";
 #endif
 
         if (string.IsNullOrWhiteSpace(m_AccountStr))
@@ -441,6 +441,7 @@ public class LoginPanel : BaseUI
                 Debug.Log(jobect["data"]["type"].ToString());
                StartCoroutine( LoginCallBack2YS(2));
                 UserInfo.Instance.is20 = true;
+                GameManager.Instance.IsRuning = true;
             }
             else if (int.Parse(jobect["data"]["type"].ToString()) == 1)
             {
@@ -759,7 +760,8 @@ public class LoginPanel : BaseUI
         }
 #if UNITY_EDITOR
         //   m_AccountStr = "1768147286@qq.com";
-        m_AccountStr = "jiajun.hu@ghz-tech.com";
+      //  m_AccountStr = "jiajun.hu@ghz-tech.com";
+        m_AccountStr = "1768147286@qq.com";
         m_PasswordStr = "123456Aa";
 #endif
         //m_AccountStr = "2463951@qq.com";

+ 1 - 1
Packages/manifest.json

@@ -1,6 +1,6 @@
 {
   "dependencies": {
-    "com.ghz.avideoplayer": "https://gogs.ghz-tech.com:8843/GHzGlass/VideoPlayerXR.git",
+    "com.ghz.avideoplayer": "https://gogs.ghz-tech.com:8843/GHzGlass/VideoPlayerXR.git#EasyMovieTexture",
     "com.ghz.mqtt": "https://gogs.ghz-tech.com:8843/GHzGlass/GHZMQTTXR.git",
     "com.ptc.vuforia.engine": "file:com.ptc.vuforia.engine-10.15.4.tgz",
     "com.unity.feature.development": "1.0.1",

+ 3 - 3
Packages/packages-lock.json

@@ -1,11 +1,11 @@
 {
   "dependencies": {
     "com.ghz.avideoplayer": {
-      "version": "https://gogs.ghz-tech.com:8843/GHzGlass/VideoPlayerXR.git",
+      "version": "https://gogs.ghz-tech.com:8843/GHzGlass/VideoPlayerXR.git#EasyMovieTexture",
       "depth": 0,
       "source": "git",
       "dependencies": {},
-      "hash": "0c10eb2d941902e3b5ff389c956ee49fd8d19f54"
+      "hash": "226456e7e10d7ad11486d11c42e302ffcfdacce1"
     },
     "com.ghz.mqtt": {
       "version": "https://gogs.ghz-tech.com:8843/GHzGlass/GHZMQTTXR.git",
@@ -288,7 +288,7 @@
         "com.unity.xr.legacyinputhelpers": "2.1.2",
         "com.unity.inputsystem": "1.4.2"
       },
-      "hash": "90df63456e8d6a8537eeeebeaa6a4050aa862e04"
+      "hash": "f3baf7793db357aa392e4f3bc43299ebcc93f625"
     },
     "com.unity.modules.ai": {
       "version": "1.0.0",

+ 5 - 2
ProjectSettings/ProjectSettings.asset

@@ -146,8 +146,11 @@ PlayerSettings:
     16:10: 1
     16:9: 1
     Others: 1
-  bundleVersion: 10.13.3
-  preloadedAssets: []
+  bundleVersion: 2.2.0
+  preloadedAssets:
+  - {fileID: 4800000, guid: c9f956787b1d945e7b36e0516201fc76, type: 3}
+  - {fileID: -6682207197718421661, guid: 8f422df2931cba0478c1fe8ab232b9a3, type: 2}
+  - {fileID: 3493090336618791480, guid: 2d049ae1db0e2b74c8251022ae6dcb95, type: 2}
   metroInputSource: 0
   wsaTransparentSwapchain: 0
   m_HolographicPauseOnTrackingLoss: 1