Browse Source

Merge branch 'F/20231018_Demo' of ssh://gogs.ghz-tech.com:30979/GHzGlass/GHZLangChao into F/20231018_Demo

DGJ 1 year ago
parent
commit
f328ef0bff

+ 10 - 1
Assets/Game/Blue/Action/ResetTransform.cs

@@ -11,11 +11,20 @@ public class ResetTransform : MonoBehaviour
     public bool FixedHeight;
 
     private float height;
+    private bool heightIsNull;
     private void Awake()
     {
-        height = OpenXRCamera.Instance.head.position.y;
+        if(OpenXRCamera.Instance!=null)
+            height = OpenXRCamera.Instance.head.position.y;
+        else
+            heightIsNull = true;
     }
 
+    private void Start()
+    {
+        if(heightIsNull)
+            height = OpenXRCamera.Instance.head.position.y;
+    }
     public void Execute()
     {
         transform.position = Xunjian.position;

+ 1 - 1
Assets/Game/ShowChoose/ShowChoose.prefab

@@ -1905,7 +1905,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 1}
   m_AnchorMax: {x: 0, y: 1}
-  m_AnchoredPosition: {x: -1212, y: 481}
+  m_AnchoredPosition: {x: -571, y: 481}
   m_SizeDelta: {x: 1096, y: 750}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &5828896859842943363

+ 9 - 9
Assets/LangChaoRTC/Remote/ShowRoom/RoomMain.prefab

@@ -693,7 +693,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 0.5882353}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
   m_RaycastTarget: 1
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
@@ -1266,7 +1266,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 0.5882353}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
   m_RaycastTarget: 1
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
@@ -1477,7 +1477,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 0.5882353}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
   m_RaycastTarget: 1
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
@@ -1612,7 +1612,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 0.5882353}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
   m_RaycastTarget: 1
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
@@ -2781,7 +2781,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 0.5882353}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
   m_RaycastTarget: 1
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
@@ -2916,7 +2916,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 0.5882353}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
   m_RaycastTarget: 1
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
@@ -3208,14 +3208,14 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_Color: {r: 1, g: 1, b: 1, a: 0.60784316}
   m_RaycastTarget: 0
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1
   m_OnCullStateChanged:
     m_PersistentCalls:
       m_Calls: []
-  m_Sprite: {fileID: 21300000, guid: e475a827f6cd8ce4983a7315b90276a9, type: 3}
+  m_Sprite: {fileID: 21300000, guid: e49baf1ce366699449aab9bcda3267ff, type: 3}
   m_Type: 0
   m_PreserveAspect: 0
   m_FillCenter: 1
@@ -4221,7 +4221,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 0.5882353}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
   m_RaycastTarget: 1
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
   m_Maskable: 1

+ 5 - 1
Assets/Scripts/Tool/HeadBtnManager.cs

@@ -2,6 +2,7 @@ using Blue;
 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
+using UnityEngine.Events;
 using UnityEngine.UI;
 
 public class HeadBtnManager : MonoSingleton<HeadBtnManager>, IController
@@ -63,14 +64,17 @@ public class HeadBtnManager : MonoSingleton<HeadBtnManager>, IController
         homeBtn2.onClick.AddListener(GoHome);
     }
 
+    public UnityEvent OnReset = new UnityEvent();
     private void Update()
     {
-
+        OnReset?.Invoke();
+        /*
         player.position =OpenXRCamera.Instance.head.transform.position;
         player.eulerAngles = new Vector3(0,OpenXRCamera.Instance.head.transform.eulerAngles.y, 0);
        
         transform.position = OpenXRCamera.Instance.head.position + player.transform.forward * 1.5f + new Vector3(0f, 0f, 0.1f);
         transform.eulerAngles = player.eulerAngles;
+        */
     }
 
     public void ShowResetBtn(ScenesManager.SceneType type , UIFollow uiFollow)