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 } }