Browse Source

修复问题,见具体备注

1 头顶按钮太大,缩小到目前的2/3
3 头顶三个按钮的顺序和PRD不一致,从左到右正确顺序为 移动场景,编辑素材,设置
4 头顶三个按钮不等间距
5 头顶三个按钮高度偏低,再抬高
5 进入移动场景后,点击“整体移动”和“绕锚点旋转”两个按钮后弹出的文字提示不对,点击“整体移动”弹出的是旋转场景的文字提示,点击“绕锚点旋转”弹出的是整体移动的文字提示
6 眼前弹出的文字提示背景框,请改成圆角
7 场景移动功能nok:按住手柄并走动,水晶点和锚点整体一起沿y轴向天空方向移动,越来越高,影响用户正常移动场景
蓝色星空 1 year ago
parent
commit
8e1bd3ddd6

+ 199 - 196
Assets/MRNavigatorPro.unity

@@ -1057,7 +1057,7 @@ GameObject:
   m_Component:
   - component: {fileID: 197044969}
   - component: {fileID: 197044971}
-  - component: {fileID: 197044970}
+  - component: {fileID: 197044972}
   m_Layer: 5
   m_Name: RawImage
   m_TagString: Untagged
@@ -1083,10 +1083,18 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: 0, y: -20}
+  m_AnchoredPosition: {x: 0, y: -15}
   m_SizeDelta: {x: 400, y: 82.5}
   m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &197044970
+--- !u!222 &197044971
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 197044968}
+  m_CullTransparentMesh: 1
+--- !u!114 &197044972
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -1095,32 +1103,27 @@ MonoBehaviour:
   m_GameObject: {fileID: 197044968}
   m_Enabled: 1
   m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
+  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 0.103773594, g: 0.103773594, b: 0.103773594, a: 1}
+  m_Color: {r: 0.101960786, g: 0.101960786, b: 0.101960786, a: 1}
   m_RaycastTarget: 1
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_Texture: {fileID: 0}
-  m_UVRect:
-    serializedVersion: 2
-    x: 0
-    y: 0
-    width: 1
-    height: 1
---- !u!222 &197044971
-CanvasRenderer:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 197044968}
-  m_CullTransparentMesh: 1
+  m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
+  m_Type: 1
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+  m_PixelsPerUnitMultiplier: 1
 --- !u!114 &199346571 stripped
 MonoBehaviour:
   m_CorrespondingSourceObject: {fileID: 5122960243441828857, guid: 73594541ba5ecf84680e516628f9f8a8,
@@ -1950,7 +1953,7 @@ MeshFilter:
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 375338274}
-  m_Mesh: {fileID: 1792011166}
+  m_Mesh: {fileID: 1690759150}
 --- !u!114 &375338278
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -4178,7 +4181,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
-  m_AnchoredPosition: {x: 0.15, y: 0}
+  m_AnchoredPosition: {x: 0.15, y: 0.05}
   m_SizeDelta: {x: 1078.5, y: 539.99994}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &1129952197
@@ -4773,12 +4776,12 @@ RectTransform:
   m_GameObject: {fileID: 1354446210}
   m_LocalRotation: {x: 0.00000006657903, y: -0, z: -0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 0.33333343, y: 0.33333343, z: 0.043333348}
+  m_LocalScale: {x: 0.2222222, y: 0.222222, z: 0.0288889}
   m_ConstrainProportionsScale: 0
   m_Children:
   - {fileID: 706104186}
-  - {fileID: 8019606653617611916}
   - {fileID: 8019606655629294615}
+  - {fileID: 8019606653617611916}
   m_Father: {fileID: 1129952196}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -5323,7 +5326,7 @@ PrefabInstance:
     - target: {fileID: 2656584712679981451, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: -0.005466839
+      value: -0.0039012975
       objectReference: {fileID: 0}
     - target: {fileID: 2656584712838976906, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
@@ -5453,7 +5456,7 @@ PrefabInstance:
     - target: {fileID: 2656584713474595953, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: -0.0039501097
+      value: -0.0017162736
       objectReference: {fileID: 0}
     - target: {fileID: 2656584713571100915, guid: 3e8996c442fe40541beb734ca45f2bf6,
         type: 3}
@@ -6113,6 +6116,170 @@ MonoBehaviour:
             m_StringArgument: 
             m_BoolArgument: 0
           m_CallState: 2
+--- !u!43 &1690759150
+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 &1709118220 stripped
 GameObject:
   m_CorrespondingSourceObject: {fileID: 1269803834018763930, guid: c2949074f3b713b4abec308e62ad895b,
@@ -6422,170 +6589,6 @@ CanvasRenderer:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1778699410}
   m_CullTransparentMesh: 0
---- !u!43 &1792011166
-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!850595691 &1800010878
 LightingSettings:
   m_ObjectHideFlags: 0
@@ -8312,7 +8315,7 @@ PrefabInstance:
     - target: {fileID: 486518953982833418, guid: 6693e68f506a6c944b1783fb7e52a498,
         type: 3}
       propertyPath: m_AnchoredPosition.y
-      value: -0.00197845
+      value: -0.0037071502
       objectReference: {fileID: 0}
     - target: {fileID: 486518953989235048, guid: 6693e68f506a6c944b1783fb7e52a498,
         type: 3}
@@ -12158,7 +12161,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.0053191497}
+  m_AnchoredPosition: {x: 0, y: -0.004479358}
   m_SizeDelta: {x: 0, y: 0}
   m_Pivot: {x: 0, y: 1}
 --- !u!114 &1180406930876628118
@@ -13738,7 +13741,7 @@ PrefabInstance:
     - target: {fileID: 5079657590173202044, guid: 7e724082e3f166747b1152780155e212,
         type: 3}
       propertyPath: m_RootOrder
-      value: 1
+      value: 2
       objectReference: {fileID: 0}
     - target: {fileID: 5079657590173202044, guid: 7e724082e3f166747b1152780155e212,
         type: 3}
@@ -13758,7 +13761,7 @@ PrefabInstance:
     - target: {fileID: 5079657590173202044, guid: 7e724082e3f166747b1152780155e212,
         type: 3}
       propertyPath: m_LocalPosition.x
-      value: 0
+      value: 400
       objectReference: {fileID: 0}
     - target: {fileID: 5079657590173202044, guid: 7e724082e3f166747b1152780155e212,
         type: 3}
@@ -14006,7 +14009,7 @@ PrefabInstance:
     - target: {fileID: 5079657590173202044, guid: 7e724082e3f166747b1152780155e212,
         type: 3}
       propertyPath: m_RootOrder
-      value: 2
+      value: 1
       objectReference: {fileID: 0}
     - target: {fileID: 5079657590173202044, guid: 7e724082e3f166747b1152780155e212,
         type: 3}
@@ -14026,7 +14029,7 @@ PrefabInstance:
     - target: {fileID: 5079657590173202044, guid: 7e724082e3f166747b1152780155e212,
         type: 3}
       propertyPath: m_LocalPosition.x
-      value: 400
+      value: 0
       objectReference: {fileID: 0}
     - target: {fileID: 5079657590173202044, guid: 7e724082e3f166747b1152780155e212,
         type: 3}

+ 1 - 0
Assets/Scripts/Blue/Controller/LoadReference.cs

@@ -25,6 +25,7 @@ public class LoadReference : AbstractController
         SceneIOCContainer.Instance.Push("goRefrence",goRefrence);
         goRefrence.transform.localPosition = pos;
         goRefrence.transform.parent = meshTestParent;
+        SetSceneActive.Instance.goReference_y = goRefrence.transform.position.y;
         goRefrence.SetActive(false);
     }
 }

+ 6 - 6
Assets/Scripts/Blue/Controller/SavePanel.cs

@@ -1,7 +1,5 @@
 using Blue;
-using Immersal.AR;
 using Newtonsoft.Json;
-using SC.XR.Unity;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.UI;
@@ -21,7 +19,10 @@ public class SavePanel : AbstractController
     private ScenePosRotInfo rot = new ScenePosRotInfo();
 
     public LoadReference LoadReferenceController;
-    private GameObject goReference;
+    private GameObject goReference // ²ÎÕÕÎï
+    {
+        get =>SceneIOCContainer.Instance.Pull("goRefrence")as GameObject;
+    }
     private void Start()
     {
         posRotlist.Add(pos); posRotlist.Add(rot);
@@ -90,13 +91,12 @@ public class SavePanel : AbstractController
     private void OnEnable()
     {
         SetSceneActive.Instance.active = true;
-        if(goReference==null)
-            goReference = LoadReferenceController.goRefrence;
         goReference.SetActive(true);
     }
     private void OnDisable()
     {
         SetSceneActive.Instance.active = false;
-        goReference.SetActive(false);
+        if(goReference!=null)
+            goReference.SetActive(false);
     }
 }

+ 1 - 0
Assets/Scripts/Blue/Model/SetSceneActive.cs

@@ -3,4 +3,5 @@ using Blue;
 public class SetSceneActive : BlueSingleton<SetSceneActive>
 {
     public bool active = false;
+    public float goReference_y;
 }

+ 4 - 5
Assets/Scripts/Blue/Temp/MoveChange.cs

@@ -10,7 +10,7 @@ public class MoveChange : MonoBehaviour
     private Transform ARSpaceForAll=>(SceneIOCContainer.Instance.Pull("ARSpaceForAll")as GameObject).transform;
     [SerializeField] private Toggle RotToggle;
     private bool isDown;
-    private float y=> mesh_test.transform.position.y;
+    private float y=> SetSceneActive.Instance.goReference_y;
     void Start()
     {
         DispatcherBase.KeyDownDelegateRegister(keyDownEventDelegate);
@@ -41,13 +41,12 @@ public class MoveChange : MonoBehaviour
         if(!IsRot)
         {
             TempVector3 = OpenXRCamera.Instance.head.position-goRefrence.transform.position;
-            mesh_test.transform.parent = goRefrence.transform;
         }
         else
         {
             TempVector3 = ControllerTracker.localEulerAngles-goRefrence.transform.localEulerAngles;
-            mesh_test.transform.parent = goRefrence.transform;
         }
+        mesh_test.transform.parent = goRefrence.transform;
 
 /*
         Debug.Log("keyUpEventDelegate===>" + keyCode);
@@ -132,12 +131,12 @@ public class MoveChange : MonoBehaviour
         txtTip.SetActive(true);
         if (isOn)
         {
-            txtTip.GetComponentInChildren<Text>().text = "如需移动场景,请按住手柄拖动场景并走动\n场景将跟随您的脚步进行整体移动";
+            txtTip.GetComponentInChildren<Text>().text = "如需调整场景旋转角度,请按住手柄拖动场景\n场景将以锚点为圆心进行旋转";
             IsRot = true;
         }
         else
         {
-            txtTip.GetComponentInChildren<Text>().text = "如需调整场景旋转角度,请按住手柄拖动场景\n场景将以锚点为圆心进行旋转";
+            txtTip.GetComponentInChildren<Text>().text = "如需移动场景,请按住手柄拖动场景并走动\n场景将跟随您的脚步进行整体移动";
             IsRot = false;
         }
     }

+ 7 - 1
Assets/Scripts/Blue/Test/MQTTTest.cs

@@ -20,7 +20,13 @@ public class MQTTTest : AbstractController
         "client/mqttx_ab869d21"
     };
     private IMQTTService mQTTService;
-
+/*
+1883	MQTT 协议端口
+8883	MQTT/SSL 端口
+8083    MQTT/WebSocket 端口
+8080    HTTP API 端口
+18083   Dashboard 管理控制台端口
+*/
     private void Start()
     {
         mQTTService = this.GetService<IMQTTService>();

+ 2 - 2
Assets/Scripts/MQTT/M2MqttUnity/Examples/Scenes/BlueTestMQTT.unity

@@ -1159,7 +1159,7 @@ RectTransform:
   - {fileID: 1377489050}
   - {fileID: 2033646161}
   m_Father: {fileID: 0}
-  m_RootOrder: 2
+  m_RootOrder: 3
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0}
   m_AnchorMax: {x: 0, y: 0}
@@ -1528,7 +1528,7 @@ Transform:
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 0}
-  m_RootOrder: 3
+  m_RootOrder: 2
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &1584020030
 GameObject: