Browse Source

修改移動位置后 不會保存的BUG

胡佳骏 1 year ago
parent
commit
ed941ab8b1

+ 1 - 0
Assets/2.0/User/Model/ModelItem.cs

@@ -89,6 +89,7 @@ public class ModelItem
 
     Vector3 getInfoPos()
     {
+        Debug.Log("初始化坐标===》"+ prefabModel.transform.localPosition);
         if (prefabModel.transform.localPosition != Vector3.zero)
         {
             return prefabModel.transform.localPosition;

+ 10 - 1
Assets/2.0/User/UserScene/UserSceneManager.cs

@@ -131,10 +131,11 @@ public class UserSceneManager : XRTool.Util.Singleton<UserSceneManager>
                             if(ModelManager.Instance.modellist.ContainsKey(int.Parse(msg["listSpoit"][i]["material"][j]["id"].ToString())))
                             {
                                 ModelList modellist = ModelManager.Instance.GetModelList(int.Parse(msg["listSpoit"][i]["material"][j]["id"].ToString()));
-                                Debug.Log("DGJ   ====> " +(msg["listSpoit"][i]["material"][j]["objectTransform"].ToJson()));
+                                Debug.Log("DGJ   ====> "+ msg["listSpoit"][i]["material"][j]["id"].ToString() + "_" +(msg["listSpoit"][i]["material"][j]["objectTransform"].ToJson()));
                                 modellist.objectTransform = JsonConvert.DeserializeObject<ObjectTransform>(msg["listSpoit"][i]["material"][j]["objectTransform"].ToJson());
                                // modellist._model.transform.parent = si.SpotsObj.transform;
                                 modellist.spotsItem = si;
+                                modellist.select = bool.Parse(msg["listSpoit"][i]["material"][j]["select"].ToString());
                                 modellist.init(false); 
                                 for (int l = 0; l < modellist.materialList.Count; l++)
                                 {
@@ -146,12 +147,20 @@ public class UserSceneManager : XRTool.Util.Singleton<UserSceneManager>
                                 {
                                     for (int z = 0; z < msg["listSpoit"][i]["material"][j]["materialList"].Count; z++)
                                     {
+                                        Debug.Log("DGJ2   ====> " + msg["listSpoit"][i]["material"][j]["materialList"][z]["id"].ToJson() + "_" + (msg["listSpoit"][i]["material"][j]["materialList"][z]["objectTransform"].ToJson()));
                                         modellist.materialList[z].objectTransform = JsonConvert.DeserializeObject<ObjectTransform>(msg["listSpoit"][i]["material"][j]["materialList"][z]["objectTransform"].ToJson());
                                         //modellist.materialList[z].initModelObj();
+                                        if (modellist.materialList[z].objectTransform.nowPos != Vector3.zero)
+                                            modellist.materialList[z].prefabModel.transform.localPosition = modellist.materialList[z].objectTransform.nowPos;
                                     }
                                 }
                                 si.init();
                             }
+                            else
+                            {
+                                Debug.Log("沒有找到===》" + int.Parse(msg["listSpoit"][i]["material"][j]["id"].ToString()));
+                                Debug.Log("沒有找到===》" + (msg["listSpoit"][i]["material"][j]["objectTransform"].ToJson()));
+            }
                         }
                     }
 

+ 1 - 1
Assets/Map Data/85471-ghzoffice-dense.ply.meta

@@ -7,4 +7,4 @@ ScriptedImporter:
   userData: 
   assetBundleName: 
   assetBundleVariant: 
-  script: {fileID: 11500000, guid: 649469c6a3fb99e49a8b3ed0ff48d866, type: 3}
+  script: {fileID: 11500000, guid: bb61eadf1271610449b8fe5e0be4d3bc, type: 3}

+ 1 - 1
Assets/Map Data/85471-ghzoffice-sparse.ply.meta

@@ -7,4 +7,4 @@ ScriptedImporter:
   userData: 
   assetBundleName: 
   assetBundleVariant: 
-  script: {fileID: 11500000, guid: 649469c6a3fb99e49a8b3ed0ff48d866, type: 3}
+  script: {fileID: 11500000, guid: bb61eadf1271610449b8fe5e0be4d3bc, type: 3}

+ 1 - 1
Assets/Map Data/85471-ghzoffice-tex.glb.meta

@@ -7,4 +7,4 @@ ScriptedImporter:
   userData: 
   assetBundleName: 
   assetBundleVariant: 
-  script: {fileID: 11500000, guid: 2b41132147e7df9498566a67dbd40543, type: 3}
+  script: {fileID: 11500000, guid: 8a80967e1e6521b4fb722ed8d5dddf56, type: 3}

+ 1 - 1
Assets/Prefab/BluePrefabs/ModelItem/Cartoon+castle.glb.meta

@@ -7,4 +7,4 @@ ScriptedImporter:
   userData: 
   assetBundleName: 
   assetBundleVariant: 
-  script: {fileID: 11500000, guid: 2b41132147e7df9498566a67dbd40543, type: 3}
+  script: {fileID: 11500000, guid: 8a80967e1e6521b4fb722ed8d5dddf56, type: 3}

+ 2 - 2
Assets/Resources/Template/Prefab/yangshi4.prefab

@@ -200,7 +200,7 @@ MonoBehaviour:
   m_FallbackScreenDPI: 96
   m_DefaultSpriteDPI: 96
   m_DynamicPixelsPerUnit: 1
-  m_PresetInfoIsWorld: 1
+  m_PresetInfoIsWorld: 0
 --- !u!114 &112542047739079846
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -490,7 +490,7 @@ PrefabInstance:
     - target: {fileID: 2828833022510646942, guid: 6dbc5d941a7a6f541a9fa826c97abbbb,
         type: 3}
       propertyPath: m_LocalPosition.y
-      value: 0.364
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 2828833022510646942, guid: 6dbc5d941a7a6f541a9fa826c97abbbb,
         type: 3}

+ 2 - 2
Assets/Resources/VuforiaConfiguration.asset

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

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

@@ -208,7 +208,8 @@ public class SRTitleLayout : MonoBehaviour
             {
                 go.name = string.IsNullOrWhiteSpace(mat.name) ? par.name + "-" + i.ToString() : mat.name;
                 go.AddComponent<EditorEventHandler>().Type = (MaterialType)(mat.type);
-
+                Debug.Log("materialObls.select===>" + materialObls.select);
+                Debug.Log("materialObls.select===>" + mat.objectTransform.nowPos);
                 if (materialObls.select)
                 {
                     go.transform.localPosition = mat.objectTransform.nowPos;

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

@@ -831,7 +831,7 @@ public class GameManager : MonoSingleton<GameManager>
                     obj.name = sp.modelList[z].name;
                     obj.objectTransform = sp.modelList[z].objectTransform;
                     obj.describe = sp.modelList[z].describe;
-                    obj.select = sp.modelList[z].select;
+                    obj.select = true;// sp.modelList[z].select;
                     obj.type = sp.modelList[z].type;
                     obj.materialList = materialList;
                     MaterialObllsit.Add(obj);

+ 7 - 10
ProjectSettings/ProjectSettings.asset

@@ -8,7 +8,7 @@ PlayerSettings:
   AndroidProfiler: 0
   AndroidFilterTouchesWhenObscured: 0
   AndroidEnableSustainedPerformanceMode: 0
-  defaultScreenOrientation: 0
+  defaultScreenOrientation: 3
   targetDevice: 2
   useOnDemandResources: 0
   accelerometerFrequency: 60
@@ -147,10 +147,7 @@ PlayerSettings:
     16:9: 1
     Others: 1
   bundleVersion: 2.2.0
-  preloadedAssets:
-  - {fileID: 8054927593526610082, guid: 37a1f8bdd410d4b828deab52a2e4f83c, type: 2}
-  - {fileID: -3501276816584573091, guid: c198c069723694304bba47d4e5cba822, type: 2}
-  - {fileID: 4800000, guid: c9f956787b1d945e7b36e0516201fc76, type: 3}
+  preloadedAssets: []
   metroInputSource: 0
   wsaTransparentSwapchain: 0
   m_HolographicPauseOnTrackingLoss: 1
@@ -178,7 +175,7 @@ PlayerSettings:
     tvOS: 0
   overrideDefaultApplicationIdentifier: 0
   AndroidBundleVersionCode: 1
-  AndroidMinSdkVersion: 28
+  AndroidMinSdkVersion: 26
   AndroidTargetSdkVersion: 0
   AndroidPreferredInstallLocation: 1
   aotOptions: 
@@ -592,7 +589,7 @@ PlayerSettings:
   openGLRequireES32: 0
   m_TemplateCustomTags: {}
   mobileMTRendering:
-    Android: 1
+    Android: 0
     iPhone: 1
     tvOS: 1
   m_BuildTargetGroupLightmapEncodingQuality:
@@ -938,6 +935,7 @@ PlayerSettings:
   metroSplashScreenUseBackgroundColor: 1
   platformCapabilities:
     WindowsStoreApps:
+      EnterpriseAuthentication: False
       OfflineMapsManagement: False
       HumanInterfaceDevice: False
       Location: False
@@ -949,7 +947,6 @@ PlayerSettings:
       PrivateNetworkClientServer: False
       InternetClientServer: False
       VideosLibrary: False
-      BackgroundMediaPlayback: False
       Objects3D: False
       RemoteSystem: False
       BlockedChatMessages: False
@@ -972,9 +969,9 @@ PlayerSettings:
       RecordedCallsFolder: False
       Contacts: False
       InternetClient: True
-      Proximity: False
       CodeGeneration: False
-      EnterpriseAuthentication: False
+      BackgroundMediaPlayback: False
+      Proximity: False
   metroTargetDeviceFamilies: {}
   metroFTAName: 
   metroFTAFileTypes: []

+ 4 - 2
ProjectSettings/TagManager.asset

@@ -3,7 +3,9 @@
 --- !u!78 &1
 TagManager:
   serializedVersion: 2
-  tags: []
+  tags:
+  - TriggerBox
+  - UIRoot_UGUI
   layers:
   - Default
   - TransparentFX
@@ -35,7 +37,7 @@ TagManager:
   - 
   - 
   - 
-  - 
+  - 30
   - 
   m_SortingLayers:
   - name: Default