Browse Source

增加【用户】编辑选择,针对不同用户选择自动定位、文心一言,XRKocalizer.UserFiltering=false

蓝色星空 1 year ago
parent
commit
52e8264352

+ 190 - 191
Assets/MRNavigatorPro.unity

@@ -2106,7 +2106,7 @@ MeshFilter:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 375338274}
-  m_Mesh: {fileID: 486659905}
+  m_Mesh: {fileID: 1879206224}
 --- !u!114 &375338278
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -2257,170 +2257,6 @@ CanvasRenderer:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 413893614}
   m_CullTransparentMesh: 0
---- !u!43 &486659905
-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!114 &493550942 stripped
 MonoBehaviour:
   m_CorrespondingSourceObject: {fileID: 3134174762876500542, guid: 697420e71aa8bea4b938e2f3986965a6,
@@ -5879,7 +5715,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   m_AutoStart: 1
   localizationInterval: 2
-  m_UseFiltering: 1
+  m_UseFiltering: 0
   m_ResetOnMapChange: 0
   m_BurstMode: 1
   m_UseGeoPoseLocalizer: 0
@@ -6485,7 +6321,7 @@ PrefabInstance:
     - target: {fileID: 1604522696401356376, guid: 7e724082e3f166747b1152780155e212,
         type: 3}
       propertyPath: onValueChanged.m_PersistentCalls.m_Calls.Array.size
-      value: 1
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 1604522696401356376, guid: 7e724082e3f166747b1152780155e212,
         type: 3}
@@ -6671,7 +6507,7 @@ PrefabInstance:
     - target: {fileID: 8221249705219883143, guid: 7e724082e3f166747b1152780155e212,
         type: 3}
       propertyPath: m_Name
-      value: Test
+      value: LocalizeBtn
       objectReference: {fileID: 0}
     - target: {fileID: 8221249705219883143, guid: 7e724082e3f166747b1152780155e212,
         type: 3}
@@ -7322,7 +7158,7 @@ PrefabInstance:
     - target: {fileID: 2656584712679981451, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: -0.0059300708
+      value: -0.005154792
       objectReference: {fileID: 0}
     - target: {fileID: 2656584712838976906, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
@@ -7452,37 +7288,37 @@ PrefabInstance:
     - target: {fileID: 2656584713474595953, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: -0.0019608259
+      value: -0.0031788445
       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}
@@ -7492,62 +7328,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}
@@ -7827,7 +7663,6 @@ MonoBehaviour:
   canTwoHandScale: 0
   minScaleRatio: 0.8
   maxScaleRatio: 3
-  isParentDrag: 0
 --- !u!114 &1605254284
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -9032,6 +8867,170 @@ Transform:
   m_Father: {fileID: 210725851}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!43 &1879206224
+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 &1884715970
 GameObject:
   m_ObjectHideFlags: 0
@@ -10364,7 +10363,7 @@ PrefabInstance:
     - target: {fileID: 486518953982833418, guid: 6693e68f506a6c944b1783fb7e52a498,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: 0.000058554444
+      value: 0.0005066204
       objectReference: {fileID: 0}
     - target: {fileID: 486518953989235048, guid: 6693e68f506a6c944b1783fb7e52a498,
         type: 3}
@@ -14210,7 +14209,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.0012479936}
+  m_AnchoredPosition: {x: 0, y: -0.005229381}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0, y: 1}
 --- !u!114 &1180406930876628118

+ 50 - 2
Assets/Prefab/BluePrefabs/BlueRoot.prefab

@@ -75,8 +75,6 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: a9c34e33224fe894eb17fb42e89185f6, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  XRLocalizer: {fileID: 0}
-  rateTime: 2
 --- !u!1 &327283109765934804
 GameObject:
   m_ObjectHideFlags: 0
@@ -288,6 +286,7 @@ Transform:
   - {fileID: 3420359310440475008}
   - {fileID: 381987406448428764}
   - {fileID: 872102723050277368}
+  - {fileID: 11847850051779269}
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -342,6 +341,11 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   mesh_test: {fileID: 0}
   ARSpaceForAll: {fileID: 0}
+  mXRLocalizer: {fileID: 0}
+  AnchorBtnToggle: {fileID: 0}
+  Y_Location_Toggle: {fileID: 0}
+  N_Location_Toggle: {fileID: 0}
+  ImmersalLocalizerController: {fileID: 0}
 --- !u!1 &5121041051266488258
 GameObject:
   m_ObjectHideFlags: 0
@@ -373,6 +377,50 @@ Transform:
   m_Father: {fileID: 1263283691747613010}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &6167610647906259480
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 11847850051779269}
+  - component: {fileID: 7886070564954139972}
+  m_Layer: 0
+  m_Name: CloseAutoImmersal
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &11847850051779269
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6167610647906259480}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 5886227751517987777}
+  m_RootOrder: 8
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &7886070564954139972
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6167610647906259480}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 00d5dcae46372954db15d02ef0860d12, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
 --- !u!1 &7037846102355914218
 GameObject:
   m_ObjectHideFlags: 0

+ 1 - 0
Assets/Resources/BlueUserConfig.txt

@@ -0,0 +1 @@
+{"BlueUserType":"WenChuang","Auto":false,"ERNIEBot":true}

+ 7 - 0
Assets/Resources/BlueUserConfig.txt.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 53d83c6c9d9bbcc409ae37f3789a0a3e
+TextScriptImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 1 - 0
Assets/Resources/BlueUserListConfig.txt

@@ -0,0 +1 @@
+[{"BlueUserType":"Blue","Auto":false,"ERNIEBot":false},{"BlueUserType":"WenChuang","Auto":false,"ERNIEBot":true},{"BlueUserType":"NingYuan","Auto":false,"ERNIEBot":false},{"BlueUserType":"YangPuDangJian","Auto":true,"ERNIEBot":false}]

+ 7 - 0
Assets/Resources/BlueUserListConfig.txt.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 030c10fd833603544988cad6ac5dc05d
+TextScriptImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 1 - 1
Assets/Resources/MinMapCanvas.prefab

@@ -313,7 +313,7 @@ MonoBehaviour:
   m_FallbackScreenDPI: 96
   m_DefaultSpriteDPI: 96
   m_DynamicPixelsPerUnit: 1
-  m_PresetInfoIsWorld: 0
+  m_PresetInfoIsWorld: 1
 --- !u!114 &3134174762876500538
 MonoBehaviour:
   m_ObjectHideFlags: 0

+ 19 - 0
Assets/Scripts/Blue/Controller/CloseAutoImmersal.cs

@@ -0,0 +1,19 @@
+using Newtonsoft.Json;
+using UnityEngine;
+
+/// <summary>
+/// 指定用户关闭Immersal自动定位
+/// 洋浦党建
+/// </summary>
+public class CloseAutoImmersal : MonoBehaviour
+{
+    void Start()
+    {
+        TextAsset jsonTextAsset = Resources.Load("BlueUserConfig") as TextAsset;
+        BlueUserConfig BlueUserConfig = JsonConvert.DeserializeObject<BlueUserConfig>(jsonTextAsset.text);
+        if (BlueUserConfig.Auto)
+        {
+            GameObject.Find("SetBtn/Canvas/Parent/LocalizeBtn").gameObject.SetActive(false);
+        }
+    }
+}

+ 1 - 1
Assets/Scripts/Blue/Editor/EditorInit.cs.meta → Assets/Scripts/Blue/Controller/CloseAutoImmersal.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 9504f6c2171570d4e9682ccb15b3b569
+guid: 00d5dcae46372954db15d02ef0860d12
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 12 - 2
Assets/Scripts/Blue/Controller/ImmersalLocalControl.cs

@@ -2,6 +2,7 @@ using Immersal.AR;
 using UnityEngine;
 using Blue;
 using UnityEngine.UI;
+using Newtonsoft.Json;
 
 /// <summary>
 /// 打开景点后是否开启点云定位功能
@@ -18,13 +19,21 @@ public class ImmersalLocalControl : AbstractController
     public bool isOn; // 是否开启
 
     private bool firstOpen = true; // 第一次打开
-
+    private BlueUserConfig BlueUserConfig;
     private void Awake()
     {
-        this.RegisterEvent<SetImmersalLocalEvent>(Unload);
+        TextAsset jsonTextAsset = Resources.Load("BlueUserConfig") as TextAsset;
+        BlueUserConfig = JsonConvert.DeserializeObject<BlueUserConfig>(jsonTextAsset.text);
+
+        if (!BlueUserConfig.Auto)
+        {
+            this.RegisterEvent<SetImmersalLocalEvent>(Unload);
+        }
     }
     private void OnEnable()
     {
+        if(BlueUserConfig.Auto) return;
+
         if(firstOpen)
         {
             firstOpen = false;
@@ -57,6 +66,7 @@ public class ImmersalLocalControl : AbstractController
     }
     private void OnDisable()
     {
+        if(BlueUserConfig.Auto) return;
         this.UnRegisterEvent<SetImmersalLocalEvent>(Unload);
     }
 

+ 16 - 9
Assets/Scripts/Blue/Controller/ImmersalLocalizerController.cs

@@ -3,6 +3,8 @@ using UnityEngine;
 using Blue;
 using UnityEngine.UI;
 using System.Collections;
+using Newtonsoft.Json;
+using System.Collections.Generic;
 
 /// <summary>
 /// 控制Immersal定位
@@ -18,6 +20,9 @@ public class ImmersalLocalizerController: AbstractController
 
     private void Awake()
     {
+        TextAsset jsonTextAsset = Resources.Load("BlueUserConfig") as TextAsset;
+        BlueUserConfig BlueUserConfig = JsonConvert.DeserializeObject<BlueUserConfig>(jsonTextAsset.text);
+
         this.RegisterEvent<StartImmersalLocalizerEvent>(e =>
         {
             XRLocalizer.enabled = true;
@@ -25,17 +30,19 @@ public class ImmersalLocalizerController: AbstractController
 
         this.RegisterEvent<SuccessImmersalLocalizerEvent>(e =>
         {
+            if (!BlueUserConfig.Auto)
+            {
+                Y_Location_Toggle.transform.Find("Background").GetComponent<Image>().color = white;
+                Y_Location_Toggle.transform.Find("Background/Checkmark").GetComponent<Image>().color = white;
+                N_Location_Toggle.transform.Find("Background").GetComponent<Image>().color = blue;
+                N_Location_Toggle.transform.Find("Background/Checkmark").GetComponent<Image>().color = blue;
+
+                StartCoroutine(XRLocalizerActive());
+            }
             InstantiateCommand Command = new InstantiateCommand(
-                    InstantiateSystem.Instance.BlueObject.NormalPopUp,
-                    "定位成功");
+                        InstantiateSystem.Instance.BlueObject.NormalPopUp,
+                        "定位成功");
             this.SendCommand(Command);
-
-            Y_Location_Toggle.transform.Find("Background").GetComponent<Image>().color = white;
-            Y_Location_Toggle.transform.Find("Background/Checkmark").GetComponent<Image>().color = white;
-            N_Location_Toggle.transform.Find("Background").GetComponent<Image>().color = blue;
-            N_Location_Toggle.transform.Find("Background/Checkmark").GetComponent<Image>().color = blue;
-
-            StartCoroutine(XRLocalizerActive());
         }).UnRegisterWhenGameObjectDestroyed(gameObject);
     }
 

+ 9 - 2
Assets/Scripts/Blue/Controller/IsLocation.cs

@@ -4,6 +4,7 @@ using Immersal.AR;
 using Blue;
 using UnityEngine.UI;
 using UnityEngine;
+using Newtonsoft.Json;
 
 /// <summary>
 /// 是否定位功能
@@ -19,8 +20,14 @@ public class IsLocation : AbstractController
     private Color32 white= new Color32(255, 255, 255, 255);
     private void Start()
     {
-        Y_Location_Toggle.onValueChanged.AddListener(Y_IsLocationValueChange);
-        N_Location_Toggle.onValueChanged.AddListener(N_IsLocationValueChange);
+        TextAsset jsonTextAsset = Resources.Load("BlueUserConfig") as TextAsset;
+        BlueUserConfig BlueUserConfig = JsonConvert.DeserializeObject<BlueUserConfig>(jsonTextAsset.text);
+
+        if (!BlueUserConfig.Auto)
+        {
+            Y_Location_Toggle.onValueChanged.AddListener(Y_IsLocationValueChange);
+            N_Location_Toggle.onValueChanged.AddListener(N_IsLocationValueChange);
+        }
     }
     private void Y_IsLocationValueChange(bool isOn)
     {

+ 0 - 24
Assets/Scripts/Blue/Editor/EditorInit.cs

@@ -1,24 +0,0 @@
-using UnityEditor;
-using UnityEngine;
-
-public static class EditorInit
-{
-    /*
-    [MenuItem("EditorExtensions/ProjectInit")]
-    static void Init()
-    {
-        // SetBtn 设置父子关系
-        Transform CenterCamera = GameObject.Find("SDKSystem/NRCameraRig/CenterCamera").gameObject.transform;
-        Transform SetBtn = GameObject.Find("SetBtn").gameObject.transform;
-        SetBtn.SetParent(CenterCamera);
-        Debug.LogError("SetBtn 设置父子关系");
-
-        // MoveScenePanel 设置父子关系
-        GameObject MoveScenePanel = GameObject.Find("EditorCanvas/MoveScenePanel");
-        MoveScenePanel.SetActive(false);
-        Transform AnchorBtn = SetBtn.Find("AnchorBtn");
-        MoveScenePanel.transform.SetParent(AnchorBtn);
-        Debug.LogError("MoveScenePanel 设置父子关系");
-    }
-    */
-}

+ 228 - 0
Assets/Scripts/Blue/Editor/EditorUser.cs

@@ -0,0 +1,228 @@
+using System.Collections.Generic;
+using System.IO;
+using Newtonsoft.Json;
+using UnityEditor;
+using UnityEngine;
+
+public static class EditorUser
+{
+
+    [MenuItem("用户/Blue/自动定位", false)]
+    static void BlueAutoImmersalSet()
+    {
+        CheckType();
+        BlueUserListConfig[0].Auto = !BlueUserListConfig[0].Auto;
+        string jsonData = JsonConvert.SerializeObject(BlueUserListConfig);
+        WriteUserListConfig(jsonData);
+        Menu.SetChecked("用户/Blue/自动定位", BlueUserListConfig[0].Auto);
+    }
+    [MenuItem("用户/Blue/文心一言", false)]
+    static void BlueERNIEBotSet()
+    {
+        CheckType();
+        BlueUserListConfig[0].ERNIEBot = !BlueUserListConfig[0].ERNIEBot;
+        string jsonData = JsonConvert.SerializeObject(BlueUserListConfig);
+        WriteUserListConfig(jsonData);
+        Menu.SetChecked("用户/Blue/文心一言", BlueUserListConfig[0].ERNIEBot);
+    }
+
+    [MenuItem("用户/文创/自动定位", false)]
+    static void WenChuangAutoImmersalSet()
+    {
+        CheckType();
+        BlueUserListConfig[1].Auto = !BlueUserListConfig[1].Auto;
+        string jsonData = JsonConvert.SerializeObject(BlueUserListConfig);
+        WriteUserListConfig(jsonData);
+        Menu.SetChecked("用户/文创/自动定位", BlueUserListConfig[1].Auto);
+    }
+    [MenuItem("用户/文创/文心一言", false)]
+    static void WenChuangERNIEBotSet()
+    {
+        CheckType();
+        BlueUserListConfig[1].ERNIEBot = !BlueUserListConfig[1].ERNIEBot;
+        string jsonData = JsonConvert.SerializeObject(BlueUserListConfig);
+        WriteUserListConfig(jsonData);
+        Menu.SetChecked("用户/文创/文心一言", BlueUserListConfig[1].ERNIEBot);
+    }
+
+    [MenuItem("用户/凝元/自动定位", false)]
+    static void NingYuanAutoImmersalSet()
+    {
+        CheckType();
+        BlueUserListConfig[2].Auto = !BlueUserListConfig[2].Auto;
+        string jsonData = JsonConvert.SerializeObject(BlueUserListConfig);
+        WriteUserListConfig(jsonData);
+        Menu.SetChecked("用户/凝元/自动定位", BlueUserListConfig[2].Auto);
+    }
+    [MenuItem("用户/凝元/文心一言", false)]
+    static void NingYuanERNIEBotSet()
+    {
+        CheckType();
+        BlueUserListConfig[2].ERNIEBot = !BlueUserListConfig[2].ERNIEBot;
+        string jsonData = JsonConvert.SerializeObject(BlueUserListConfig);
+        WriteUserListConfig(jsonData);
+        Menu.SetChecked("用户/凝元/文心一言", BlueUserListConfig[2].ERNIEBot);
+    }
+
+    [MenuItem("用户/杨浦党建/自动定位", false)]
+    static void YangPuDangJianAutoImmersalSet()
+    {
+        CheckType();
+        BlueUserListConfig[3].Auto = !BlueUserListConfig[3].Auto;
+        string jsonData = JsonConvert.SerializeObject(BlueUserListConfig);
+        WriteUserListConfig(jsonData);
+        Menu.SetChecked("用户/杨浦党建/自动定位", BlueUserListConfig[3].Auto);
+    }
+    [MenuItem("用户/杨浦党建/文心一言", false)]
+    static void YangPuDangJianERNIEBotSet()
+    {
+        CheckType();
+        BlueUserListConfig[3].ERNIEBot = !BlueUserListConfig[3].ERNIEBot;
+        string jsonData = JsonConvert.SerializeObject(BlueUserListConfig);
+        WriteUserListConfig(jsonData);
+        Menu.SetChecked("用户/杨浦党建/文心一言", BlueUserListConfig[3].ERNIEBot);
+    }
+
+    private static void WriteUserListConfig(string UserName)
+    {
+        string folderPath = Application.dataPath + "/Resources";
+        string filePath = Application.dataPath + "/Resources" + "/BlueUserListConfig.txt";
+
+        if (!Directory.Exists(folderPath))
+            Directory.CreateDirectory(folderPath);
+
+        if (File.Exists(filePath))
+            File.WriteAllText(filePath, UserName);
+        else
+        {
+            FileStream file = new FileStream(filePath, FileMode.Create);
+            byte[] bts = System.Text.Encoding.UTF8.GetBytes(UserName);
+            file.Write(bts, 0, bts.Length);
+            if (file != null)
+            {
+                file.Flush();
+                file.Close();
+                file.Dispose();
+            }
+        }
+        AssetDatabase.Refresh();
+    }
+
+    private static BlueUserConfig mBlueUserConfig;
+    private static void WriteUserConfig(BlueUserType blueUserType)
+    {
+        string filePath = Application.dataPath + "/Resources" + "/BlueUserConfig.txt";
+
+        TextAsset jsonTextAsset = Resources.Load("BlueUserListConfig") as TextAsset;
+        List<BlueUserConfig> BlueUserListConfig = JsonConvert.DeserializeObject<List<BlueUserConfig>>(jsonTextAsset.text);
+        foreach(var BlueUserConfig in BlueUserListConfig)
+        {
+            if(BlueUserConfig.BlueUserType==blueUserType.ToString())
+            {
+                mBlueUserConfig = new BlueUserConfig()
+                {
+                    BlueUserType = blueUserType.ToString(),
+                    Auto = BlueUserConfig.Auto,
+                    ERNIEBot = BlueUserConfig.ERNIEBot
+                };
+            }
+        }
+        string jsonData = JsonConvert.SerializeObject(mBlueUserConfig);
+        if (File.Exists(filePath))
+            File.WriteAllText(filePath, jsonData);
+        else
+        {
+            FileStream file = new FileStream(filePath, FileMode.Create);
+            byte[] bts = System.Text.Encoding.UTF8.GetBytes(jsonData);
+            file.Write(bts, 0, bts.Length);
+            if (file != null)
+            {
+                file.Flush();
+                file.Close();
+                file.Dispose();
+            }
+        }
+        AssetDatabase.Refresh();
+    }
+
+    private static List<BlueUserConfig> BlueUserListConfig;
+    private static void CheckType()
+    {
+        TextAsset jsonTextAsset = Resources.Load("BlueUserListConfig") as TextAsset;
+        if (jsonTextAsset != null)
+            BlueUserListConfig = JsonConvert.DeserializeObject<List<BlueUserConfig>>(jsonTextAsset.text);
+        else
+        {
+            var mBlueUserConfig = new BlueUserConfig()
+            {
+                BlueUserType = BlueUserType.Blue.ToString(),
+                Auto = false,
+                ERNIEBot = false
+            };
+            var mWCUserConfig = new BlueUserConfig()
+            {
+                BlueUserType = BlueUserType.WenChuang.ToString(),
+                Auto = false,
+                ERNIEBot = false
+            };
+            var mNYUserConfig = new BlueUserConfig()
+            {
+                BlueUserType = BlueUserType.NingYuan.ToString(),
+                Auto = false,
+                ERNIEBot = false
+            };
+            var mYPDJUserConfig = new BlueUserConfig()
+            {
+                BlueUserType = BlueUserType.YangPuDangJian.ToString(),
+                Auto = false,
+                ERNIEBot = false
+            };
+            BlueUserListConfig = new List<BlueUserConfig>()
+            {
+                mBlueUserConfig, // Blue
+                mWCUserConfig, //文创
+                mNYUserConfig, //凝元
+                mYPDJUserConfig}; //杨浦党建
+        }
+    }
+
+    #region
+    private static BlueUserType BlueUserType = BlueUserType.DefaultUser;
+    [MenuItem("用户/选择用户/Blue", false)]
+    public static void SelectUserBlue()
+    {
+        BlueUserType = BlueUserType.Blue;
+        Active();
+        WriteUserConfig(BlueUserType.Blue);
+    }
+    [MenuItem("用户/选择用户/文创", false)]
+    public static void SelectUserWC()
+    {
+        BlueUserType = BlueUserType.WenChuang;
+        Active();
+        WriteUserConfig(BlueUserType.WenChuang);
+    }
+    [MenuItem("用户/选择用户/凝元", false)]
+    public static void SelectUserNY()
+    {
+        BlueUserType = BlueUserType.NingYuan;
+        Active();
+        WriteUserConfig(BlueUserType.NingYuan);
+    }
+    [MenuItem("用户/选择用户/杨浦党建", false)]
+    public static void SelectUserYPDJ()
+    {
+        BlueUserType = BlueUserType.YangPuDangJian;
+        Active();
+        WriteUserConfig(BlueUserType.YangPuDangJian);
+    }
+
+    private static void Active()
+    {
+        Menu.SetChecked("用户/选择用户/Blue", BlueUserType == BlueUserType.Blue);
+        Menu.SetChecked("用户/选择用户/文创", BlueUserType == BlueUserType.WenChuang);
+        Menu.SetChecked("用户/选择用户/凝元", BlueUserType == BlueUserType.NingYuan);
+        Menu.SetChecked("用户/选择用户/杨浦党建", BlueUserType == BlueUserType.YangPuDangJian);
+    }
+#endregion
+}

+ 11 - 0
Assets/Scripts/Blue/Editor/EditorUser.cs.meta

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

+ 21 - 0
Assets/Scripts/Blue/Other/BlueUserConfig.cs

@@ -0,0 +1,21 @@
+using System.Collections.Generic;
+
+public class BLueUserListConfig
+{
+    public List<BlueUserConfig> BlueUserListConfig{ get; set; }
+}
+public class BlueUserConfig
+{
+    public string BlueUserType{ get; set; }
+    public bool Auto{ get; set; }
+    public bool ERNIEBot{ get; set; }
+}
+
+public enum BlueUserType
+{
+    DefaultUser,
+    Blue,
+    WenChuang,
+    NingYuan,
+    YangPuDangJian
+}

+ 11 - 0
Assets/Scripts/Blue/Other/BlueUserConfig.cs.meta

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

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

@@ -1,5 +1,6 @@
 using Immersal.AR;
 using LitJson;
+using Newtonsoft.Json;
 using SC.XR.Unity;
 using System;
 using System.Collections;
@@ -333,7 +334,11 @@ public class GameManager : MonoSingleton<GameManager>
         InitCrystals();
         InitBoxColliders();
 
-        //ERNIEBot.SetActive(true);
+        TextAsset jsonTextAsset = Resources.Load("BlueUserConfig") as TextAsset;
+        BlueUserConfig BlueUserConfig = JsonConvert.DeserializeObject<BlueUserConfig>(jsonTextAsset.text);
+        if (BlueUserConfig.ERNIEBot)
+            ERNIEBot.SetActive(true);
+
         CommandSystem.Instance.Send(new LoadMapFileCommand());
     }
 

+ 3 - 1
Assets/Scripts/UI/LoginPanel.cs

@@ -244,6 +244,7 @@ public class LoginPanel : BaseUI
         }
         m_Islock = !m_Islock;
     }
+
     /// <summary>
     /// 登录
     /// </summary>
@@ -261,9 +262,10 @@ public class LoginPanel : BaseUI
         
 #if UNITY_EDITOR
         m_AccountStr = "jiajun.hu@ghz-tech.com";
+        m_AccountStr = "Blue@163.com";
         m_AccountStr = "32927527@qq.com"; // YPDJ
+        m_AccountStr = "wentan.cai@nfznxr.com"; // 凝元
         m_AccountStr = "1004344@qq.com"; // 文创
-        m_AccountStr = "Blue@163.com";
         m_PasswordStr = "123456Aa";
 #endif
         if (string.IsNullOrWhiteSpace(m_AccountStr))