From bbcf0f96d9ddf21353a246430f70345d765aa677 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Wed, 26 Mar 2025 11:39:49 +0800 Subject: [PATCH] =?UTF-8?q?VR=E5=85=BC=E5=AE=B9=E6=80=A7=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Event/EventEx.cs | 6 ++++++ Assets/Scripts/Item/Show3DCamera.cs | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/Assets/Scripts/Event/EventEx.cs b/Assets/Scripts/Event/EventEx.cs index dae3ce7d..a70f1d07 100644 --- a/Assets/Scripts/Event/EventEx.cs +++ b/Assets/Scripts/Event/EventEx.cs @@ -18,4 +18,10 @@ struct EndScreenShot struct OnLock { public bool isLock; +} + +struct OnUpdatePos +{ + public Vector3 pos; + public Vector3 rot; } \ No newline at end of file diff --git a/Assets/Scripts/Item/Show3DCamera.cs b/Assets/Scripts/Item/Show3DCamera.cs index 9239937b..bf70c00b 100644 --- a/Assets/Scripts/Item/Show3DCamera.cs +++ b/Assets/Scripts/Item/Show3DCamera.cs @@ -53,6 +53,12 @@ public class Show3DCamera : MonoBehaviour TypeEventSystem.Global.Register(OnLockEvent).UnRegisterWhenDisabled(this); } + private void OnEnable() + { +#if Turing + gameObject.SetActive(false); +#endif + } private void OnLockEvent(OnLock islock) { this.lockMove = islock.isLock; @@ -441,6 +447,9 @@ public class Show3DCamera : MonoBehaviour // ʼճĿ transform.LookAt(targetPos); } +#if Turing + TypeEventSystem.Global.Send(new OnUpdatePos() { pos = gameObject.Position(), rot = gameObject.LocalEulerAngles() }); +#endif } }