소스 검색

2.0重构

胡佳骏 1 년 전
부모
커밋
44d0be853d

+ 1 - 12
Assets/2.0/GameScene.cs

@@ -2,17 +2,6 @@ using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 
-public class GameScene : MonoSingleton<GameScene>
+public class GameScene : XRTool.Util.UnitySingleton<GameScene>
 {
-    // Start is called before the first frame update
-    void Start()
-    {
-        
-    }
-
-    // Update is called once per frame
-    void Update()
-    {
-        
-    }
 }

+ 7 - 4
Assets/2.0/Tools/DownLoadItem.cs

@@ -43,18 +43,21 @@ public class DownLoadItem : MonoBehaviour
     public bool isAction;
 
     private UnityWebRequest webRequest;
-    private string baseurl = "http://office.ghz-tech.com:9904/api";
 
     public void Init(string downLoadPath,string id)
     {
         this.downLoadPath = downLoadPath;
         this.id = id;
-        StartCoroutine(DownloadFile());
+        LoadManager.Instance.downloadQueueList.Enqueue(this);
     }
 
-    private System.Collections.IEnumerator DownloadFile()
+    public System.Collections.IEnumerator DownloadFile()
     {
-        string url = baseurl + "/file/download";
+        string url = HttpAction.baseurl + HttpAction.file_download;
+        if (UserInfo.Instance.is20)
+        {
+            url = HttpAction.baseurl + HttpAction.file_download;
+        }
         using (UnityWebRequest webRequest = new UnityWebRequest(url, "POST"))
         {
             byte[] bodyRaw = Encoding.UTF8.GetBytes(downLoadPath);

+ 25 - 0
Assets/2.0/Tools/HttpAction.cs

@@ -0,0 +1,25 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class HttpAction :Singleton<HttpAction>
+{
+
+
+    //  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 client_snInfo = "/client/snInfo";
+
+    public const string project_detail = "/project/detail";
+
+    public const string file_download = "/file/download";
+
+    public const string material_init = "/material/init";
+    
+    public const string project_init = "/project/index";
+
+
+}

+ 11 - 0
Assets/2.0/Tools/HttpAction.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9478f8ab1e2ce9547aaed0091abd6d19
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 79 - 0
Assets/2.0/Tools/LoadManager.cs

@@ -1,10 +1,48 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using System.IO;
 using UnityEngine;
+using XRTool.Util;
 
 public class LoadManager : Singleton<LoadManager>
 {
+    const int maxLoad = 5;
+    int nowLoad = 0;
+    public LoadManager()
+    {
+        TimerMgr.Instance.CreateTimer(() => {
+            if(downloadQueueList.Count>0&& nowLoad< maxLoad)
+            {
+                for (int i = 0; i < downloadQueueList.Count; i++)
+                {
+                    DownLoadItem item = downloadQueueList.Dequeue();
+                    Debug.Log("正在下载===>"+ item.name);
+                    item.onProgress += (float f) => {
+
+                        Debug.Log("下载进度===>" + f);
+                    };
+
+                    item.callback += (bool b) => {
+
+                        Debug.Log("下载完成===>" );
+                        nowLoad--;
+                    };
+                   GameScene.Instance.StartCoroutine( item.DownloadFile());
+                    nowLoad++;
+                    if(nowLoad>= maxLoad)
+                    {
+                        break;
+                    }
+
+                }
+            }
+        
+        
+        }, -1);
+
+    }
+
     public Dictionary<string, DownLoadItem> downList = new Dictionary<string, DownLoadItem>();
     public void load(ModelItem model, Action<float> onProgress, Action<GameObject> callback)
     {
@@ -51,10 +89,51 @@ public class LoadManager : Singleton<LoadManager>
         };
     }
 
+    public void loadVuforia(string xmlFile, string datFile, Action<bool> xmlcallback, Action<bool> datcallback)
+    {
+
+        GameObject xmlFileDownObj = new GameObject("VufroiaTriggerDownLoad_xmlFile");
+        DownLoadItem xmlFileItem = xmlFileDownObj.AddComponent<DownLoadItem>();
+        xmlFileItem.Init(xmlFile, "VufroiaTriggerDownLoad_xmlFile");
+
+        xmlFileItem.onProgress += (float f) => {
+
+        };
+
+        xmlFileItem.callback += (bool b) =>
+        {
+            if (b)
+            {
+                File.WriteAllBytes(VufroiaTrigger.LoaclxmlFile, xmlFileItem.downLoadData);
+            }
+            xmlcallback.Invoke(b);
+        };
+
+
+        GameObject datFileObj = new GameObject("VufroiaTriggerDownLoad_datFile");
+        DownLoadItem datFileItem = datFileObj.AddComponent<DownLoadItem>();
+        datFileItem.Init(datFile, "VufroiaTriggerDownLoad_xmlFile");
+
+        datFileItem.onProgress += (float f) => {
+
+        };
+
+        datFileItem.callback += (bool b) =>
+        {
+            if (b)
+            {
+                File.WriteAllBytes(VufroiaTrigger.LoacldatFile, datFileItem.downLoadData);
+            }
+            datcallback.Invoke(b);
+        };
+    }
 
 
     public string getLoadName(string url, string version)
     {
         return url + "_" + version;
     }
+
+
+    public Queue<DownLoadItem> downloadQueueList = new Queue<DownLoadItem>();
 }

+ 28 - 2
Assets/2.0/User/Spots/SpotsItem.cs

@@ -1,6 +1,7 @@
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
+using Vuforia;
 
 public class SpotsItem
 {
@@ -9,6 +10,31 @@ public class SpotsItem
     //景点中的模型
     public Dictionary<string, ModelItem> modelList = new Dictionary<string, ModelItem>();
 
-    //景点的扫描图
-    public VufroiaTrigger vufroiaTrigger;
+
+    public ObserverBehaviour obVuforia;
+
+
+    public void setObVuforia(ObserverBehaviour obVuforia)
+    {
+        this.obVuforia = obVuforia;
+        Debug.Log("添加Vuforia监听");
+
+        this.obVuforia.OnTargetStatusChanged += OnTargetStatusChanged;
+
+    }
+
+
+    void OnTargetStatusChanged(ObserverBehaviour behaviour, TargetStatus status)
+    {
+        if (status.Status == Status.TRACKED)
+        {
+            Debug.Log("OnTargetStatusChanged 发现 " + behaviour.TargetName + "status ==>" + status.Status.ToString());
+
+        }
+        else
+        {
+            Debug.Log("OnTargetStatusChanged 消失 " + behaviour.TargetName + "status ==>" + status.Status.ToString());
+
+        }
+    }
 }

+ 54 - 7
Assets/2.0/User/Trigger/VufroiaTrigger.cs

@@ -1,18 +1,65 @@
+using LitJson;
 using System.Collections;
 using System.Collections.Generic;
+using System.IO;
 using UnityEngine;
+using Vuforia;
 
-public class VufroiaTrigger : MonoBehaviour
+public class VufroiaTrigger
 {
-    // Start is called before the first frame update
-    void Start()
+    public UserSceneItem usi;
+    public string xmlFile;
+    public string datFile;
+    public static string LoaclxmlFile;
+    public static string LoacldatFile;
+
+    bool isData;
+        bool isXML;
+    public void init(JsonData msg)
     {
-        
+        xmlFile = msg["xmlFile"].ToString();
+        datFile = msg["datFile"].ToString();
+        LoaclxmlFile = Application.persistentDataPath + "/StreamingAssets/Vuforia/" + Path.GetFileName(xmlFile);
+        LoacldatFile = Application.persistentDataPath + "/StreamingAssets/Vuforia/" + Path.GetFileName(datFile);
+        LoadManager.Instance.loadVuforia(xmlFile, datFile,(bool b)=> {
+
+            isXML = true;
+            if(isData)
+            {
+              GameScene.Instance.StartCoroutine(loadVuforia());
+            }
+
+        }, (bool b) => {
+            isData = true;
+            if (isXML)
+            {
+                GameScene.Instance.StartCoroutine(loadVuforia());
+            }
+        });
     }
 
-    // Update is called once per frame
-    void Update()
+
+    IEnumerator loadVuforia()
     {
-        
+
+        Debug.Log("¼ÓÔØDatabase");
+        IEnumerable<ObserverBehaviour> observer = VuforiaBehaviour.Instance.ObserverFactory.CreateBehavioursFromDatabase(LoaclxmlFile);
+        // Create an Image Target from the database.
+        yield return observer;
+
+        List<ObserverBehaviour> list = new List<ObserverBehaviour>();
+
+        foreach (ObserverBehaviour item in observer)
+        {
+            list.Add(item);
+        }
+
+        int count = 0;
+
+        foreach (string item in usi.SpotsList.Keys)
+        {
+            usi.SpotsList[item].setObVuforia(list[count]);
+
+        }
     }
 }

+ 1 - 0
Assets/2.0/User/UserInfo.cs

@@ -4,6 +4,7 @@ using UnityEngine;
 
 public class UserInfo: Singleton<UserInfo>
 {
+    public  bool is20 = false;
 
     //Óû§ÁîÅÆ
     public string Token;

+ 2 - 2
Assets/2.0/User/UserManager.cs

@@ -9,14 +9,14 @@ public class UserManager : SingletonMono<UserManager>
         if (isLogin)
         {
 
-            HttpTool.Instance.GetAllMaterials("/material/init", "", (string msg)=> {
+            HttpTool.Instance.GetAllMaterials(HttpAction.material_init, "", (string msg)=> {
 
                 Debug.Log("/material/init===>" + msg);
                 ModelManager.Instance.init(msg);
             
             });
 
-            HttpTool.Instance.Get("/project/index", (string msg) => {
+            HttpTool.Instance.Get(HttpAction.project_init, (string msg) => {
 
                 Debug.Log("/project/index===>" + msg);
                 UserSceneManager.Instance.initScene(msg);

+ 16 - 27
Assets/2.0/User/UserScene/UserSceneItem.cs

@@ -6,13 +6,16 @@ using UnityEngine;
 
 public class UserSceneItem
 {
+    //场景的扫描图
+    public VufroiaTrigger vufroiaTrigger;
+
     //场景ID
     public string id;
 
     //场景名字
     public string name;
 
-    //场景中的模型
+    //场景中的景点
     public Dictionary<string, SpotsItem> SpotsList = new Dictionary<string, SpotsItem>();
 
     GameObject _sceneModel;
@@ -34,31 +37,17 @@ public class UserSceneItem
     //场景原始信息
     public string info;
 
-    public void init(string id, string name)
-    {
-        Debug.Log("UserSceneItem init");
-        this.id = id;
-        this.name = name;
-
-        SendSnInfo sendNet = new SendSnInfo();
-        sendNet.sn = SendSN.GetSN();
-        //sendNet.sn = "Nreal-SN";
-        //API_GSXR_Slam.SlamManager.plugin.SN;
-        sendNet.projectId =int.Parse( this.id);
-        string jsonData = JsonMapper.ToJson(sendNet);
-        GameScene.Instance.StartCoroutine(HttpTool.Instance.SendHttp("/client/snInfo", jsonData, (message) =>
-        {
-            Debug.Log("场景===》"+name+ "==id=>" + id+ "=snInfo==>" + message);
-            SendSceneDetail detail = new SendSceneDetail();
-            detail.id = int.Parse(this.id);
-            string str = JsonConvert.SerializeObject(detail);
-            HttpTool.Instance.PostTest("/project/detail", str, (mes) =>
-            {
-
-                Debug.Log("场景===》" + name + "==id=>" + id + "=detail==>" + mes);
 
-            });
-
-        }));
-    }
+    public string sentiment;
+    public string updateTime;
+    public string backgroundImages;
+    public string navLines;
+    public string status;
+    public string belong;
+    public string describe;
+    public string image;
+    public string map;
+    public string sandTable;
+    public string xmlFile;
+    public string datFile;
 }

+ 58 - 6
Assets/2.0/User/UserScene/UserSceneManager.cs

@@ -1,4 +1,5 @@
 using LitJson;
+using Newtonsoft.Json;
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
@@ -18,16 +19,67 @@ public class UserSceneManager : XRTool.Util.Singleton<UserSceneManager>
             Debug.Log("initScene IsArray");
             for (int i = 0; i < data["data"].Count; i++)
             {
-                UserSceneItem usi = CreateItem(data["data"][i]);
-                SceneList.Add(usi.id, usi);
+                init(data["data"][i]["id"].ToString(), data["data"][i]["name"].ToString());
             }
         }
     }
 
-    UserSceneItem CreateItem(JsonData msg)
+    public void init(string id, string name)
     {
-        UserSceneItem usi = new UserSceneItem();
-        usi.init(msg["id"].ToString(), msg["name"].ToString());
-        return usi;
+        SendSnInfo sendNet = new SendSnInfo();
+        sendNet.sn = SendSN.GetSN();
+        sendNet.projectId = int.Parse(id);
+        string jsonData = JsonMapper.ToJson(sendNet);
+        GameScene.Instance.StartCoroutine(HttpTool.Instance.SendHttp(HttpAction.client_snInfo, jsonData, (message) =>
+        {
+            SendSceneDetail detail = new SendSceneDetail();
+            detail.id = int.Parse(id);
+            string str = JsonConvert.SerializeObject(detail);
+            HttpTool
+            .Instance.PostTest(HttpAction.project_detail, str, (mes) =>
+            {
+                JsonData data = JsonMapper.ToObject(mes);
+                if (data["data"].ToString() != null)
+                {
+                    CreateItem(data["data"]);
+                }
+
+            });
+
+        }));
+    }
+    void CreateItem(JsonData msg)
+    {
+
+        Debug.Log(" ³õʼ»¯³¡¾° msg==¡·" + msg.ToJson());
+        UserSceneItem usi = new UserSceneItem();//JsonConvert.DeserializeObject<UserSceneItem>(msg.ToJson());
+        usi.id = msg["id"].ToString();
+        usi.name = msg["name"].ToString();
+        if(msg["sentiment"]!=null)
+            usi.sentiment = msg["sentiment"].ToString();
+        if (msg["updateTime"] != null)
+            usi.updateTime = msg["updateTime"].ToString();
+        if (msg["backgroundImages"] != null)
+            usi.backgroundImages = msg["backgroundImages"].ToString();
+        if (msg["navLines"] != null)
+            usi.navLines = msg["navLines"].ToString();
+        if (msg["status"] != null)
+            usi.status = msg["status"].ToString();
+        if (msg["belong"] != null)
+            usi.belong = msg["belong"].ToString();
+        if (msg["describe"] != null)
+            usi.describe = msg["describe"].ToString();
+        if (msg["image"] != null)
+            usi.image = msg["image"].ToString();
+        if (msg["map"] != null)
+            usi.map = msg["map"].ToString();
+        if (msg["sandTable"] != null)
+            usi.sandTable = msg["sandTable"].ToString();
+        usi.vufroiaTrigger = new VufroiaTrigger();
+        usi.vufroiaTrigger.init(msg);
+        usi.vufroiaTrigger.init(msg);
+
+
+        SceneList.Add(usi.id, usi);
     }
 }

+ 182 - 169
Assets/MRNavigatorPro.unity

@@ -958,6 +958,170 @@ Transform:
     type: 3}
   m_PrefabInstance: {fileID: 344366729}
   m_PrefabAsset: {fileID: 0}
+--- !u!43 &312073580
+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!1001 &344366729
 PrefabInstance:
   m_ObjectHideFlags: 0
@@ -1116,7 +1280,7 @@ MeshFilter:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 375338274}
-  m_Mesh: {fileID: 1473432789}
+  m_Mesh: {fileID: 312073580}
 --- !u!114 &375338278
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -3879,170 +4043,6 @@ PrefabInstance:
         type: 2}
     m_RemovedComponents: []
   m_SourcePrefab: {fileID: 100100000, guid: 7f34641aa9b798d4980647aff233a880, type: 3}
---- !u!43 &1473432789
-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!1001 &1494370969
 PrefabInstance:
   m_ObjectHideFlags: 0
@@ -4058,7 +4058,7 @@ PrefabInstance:
     - target: {fileID: 2656584712679981451, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: 0.00042339688
+      value: -0.0052968804
       objectReference: {fileID: 0}
     - target: {fileID: 2656584712838976906, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
@@ -4188,7 +4188,7 @@ PrefabInstance:
     - target: {fileID: 2656584713474595953, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: -0.006891171
+      value: -0.0016363565
       objectReference: {fileID: 0}
     - target: {fileID: 2656584713571100915, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
@@ -6212,6 +6212,7 @@ GameObject:
   m_Component:
   - component: {fileID: 2066434262}
   - component: {fileID: 2066434261}
+  - component: {fileID: 2066434263}
   m_Layer: 0
   m_Name: GameoScene
   m_TagString: Untagged
@@ -6247,6 +6248,18 @@ Transform:
   m_Father: {fileID: 0}
   m_RootOrder: 14
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &2066434263
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 2066434260}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 95bd5e73b2b930240adab20b3c9619d2, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
 --- !u!1 &2120824767
 GameObject:
   m_ObjectHideFlags: 0
@@ -6555,7 +6568,7 @@ PrefabInstance:
     - target: {fileID: 486518953982833418, guid: 6693e68f506a6c944b1783fb7e52a498,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: -0.0016924221
+      value: -0.00037310194
       objectReference: {fileID: 0}
     - target: {fileID: 486518953989235048, guid: 6693e68f506a6c944b1783fb7e52a498,
         type: 3}
@@ -10370,7 +10383,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.0032742948}
+  m_AnchoredPosition: {x: 0, y: -0.0055864626}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0, y: 1}
 --- !u!114 &1180406930876628118

+ 2 - 2
Assets/Resources/VuforiaConfiguration.asset

@@ -24,7 +24,7 @@ MonoBehaviour:
     shareRecordingsInITunes: 0
     logLevel: 0
     version: 10.13.3
-    eulaAcceptedVersions: '{"Values":["","0.0","10.11","10.12","10.13"]}'
+    eulaAcceptedVersions: '{"Values":["","0.0","10.11","10.12","10.13","8.5","7.5","8.3","7.2","7.1","8.0","7.7","8.1","9.2","9.4","10.10","9.8","10.3","10.2","9.1","10.15","9.7"]}'
   database:
     disableModelExtraction: 0
   shaders:
@@ -44,7 +44,7 @@ MonoBehaviour:
     autoImportArcore: 1
     thirdPartyARCoreClientDetected: 0
   playmode:
-    mSequencePath: 
+    mRecordingPath: 
     playModeType: 0
   webcam:
     renderTextureLayer: 30

+ 4 - 4
Assets/Scripts/Download/DownloadManager.cs

@@ -402,7 +402,7 @@ public class DownloadManager : SingletonMono<DownloadManager>
     /// <returns></returns>
     IEnumerator _DownloadFile(DownloadData data, Action<UnityWebRequest> actionResult = null)
     {
-        string url = HttpTool.Instance.BaseUrl + "/file/download";
+        string url = HttpAction.baseurl + HttpAction.file_download;
 
         FileDown file = new FileDown();
         if (string.IsNullOrWhiteSpace(data.downloadPath))
@@ -547,7 +547,7 @@ public class DownloadManager : SingletonMono<DownloadManager>
     /// <returns></returns>
     private IEnumerator DownloadTexture(DownloadData data, Action<bool, Texture2D> downloadEnd, bool isLoca)
     {
-        string realUrl = isLoca ? data.localSavePath : HttpTool.Instance.BaseUrl + data.downloadPath;
+        string realUrl = isLoca ? data.localSavePath : HttpAction.baseurl + data.downloadPath;
         //Debug.Log("图片下载地址为" + realUrl);
         //if (isLoca)
         //{
@@ -649,7 +649,7 @@ public class DownloadManager : SingletonMono<DownloadManager>
 
     IEnumerator GetMapImage(DownloadData data, Action<bool, Texture2D> downloadEnd)
     {
-        string realUrl = HttpTool.Instance.BaseUrl + "/file/download";
+        string realUrl = HttpAction.baseurl + HttpAction.file_download;
         FileDown file = new FileDown();
         file.url = data.downloadPath;
         string jsonString = JsonConvert.SerializeObject(file);
@@ -790,7 +790,7 @@ public class DownloadManager : SingletonMono<DownloadManager>
                 yield break;
             }
 
-            string baseUrl = HttpTool.Instance.BaseUrl + data.downloadPath;
+            string baseUrl = HttpAction.baseurl + data.downloadPath;
             //Debug.Log(baseUrl + "ABABABABABAB");
             AssetBundle ab = null;
             UnityWebRequest request = UnityWebRequestAssetBundle.GetAssetBundle(baseUrl);

+ 5 - 17
Assets/Scripts/Net/HttpTool.cs

@@ -14,14 +14,6 @@ using Newtonsoft.Json.Linq;
 /// </summary>
 public class HttpTool : MonoSingleton<HttpTool>
 {
-    public static bool is20 = false;
-
-    private string baseUrl20 = "https://office.ghz-tech.com:3424/api";
-
-    //  private string baseUrl = "http://office.ghz-tech.com:3425/guideSystem";
-    private string baseUrl = "http://office.ghz-tech.com:9904/api";
-    private string UrlPointCloud = "https://pro.qulivr.com/mr-navigator/v1";
-    //private string token = "";
     Dictionary<string, string> requestHeader = new Dictionary<string, string>();  //  header
     void Awake()
     {
@@ -35,10 +27,6 @@ public class HttpTool : MonoSingleton<HttpTool>
        // get { return token; }
    // }
 
-    public string BaseUrl
-    {
-        get { return baseUrl; }
-    }
 
     public Dictionary<string, string> RequestHeader
     {
@@ -58,7 +46,7 @@ public class HttpTool : MonoSingleton<HttpTool>
 
     public void GetPointFile(string methodName, string projectId, string fileType, Action<string> callback)
     {
-        string url = UrlPointCloud + methodName;
+        string url =HttpAction.UrlPointCloud + methodName;
         // 创建URL
         UriBuilder uriBuilder = new UriBuilder(url);
         // 添加查询参数
@@ -113,17 +101,17 @@ public class HttpTool : MonoSingleton<HttpTool>
         {
             if(isCloud)
             {  
-                url = UrlPointCloud + methodName;
+                url =   HttpAction.UrlPointCloud + methodName;
             }else
             {
-                if(is20)
+                if(UserInfo.Instance.is20)
                 {
-                    url = baseUrl20 + methodName;
+                    url = HttpAction.baseurl20 + methodName;
 
                 }
                 else
                 {
-                    url = baseUrl + methodName;
+                    url = HttpAction.baseurl + methodName;
 
                 }
             }

+ 2 - 2
Assets/Scripts/UI/LoginPanel.cs

@@ -293,8 +293,8 @@ public class LoginPanel : BaseUI
         string jsonLogin = JsonMapper.ToJson(sendLogin);
         UIManager.Instance.ShowUI(UINameConfig.LoadingPanel, typeof(LoadingPanel), (int)ELoadState.login);
 
-        HttpTool.is20 = true;
-        if(HttpTool.is20)
+        UserInfo.Instance.is20 = true;
+        if(UserInfo.Instance.is20)
         {
             HttpTool.Instance.PostLogin("/user/login", jsonLogin, LoginCallBack2);
         }