diff --git a/Assets/Scripts/Interaction/TouchPositionHandler.cs b/Assets/Scripts/Interaction/TouchPositionHandler.cs index a8a9461..9b9127c 100644 --- a/Assets/Scripts/Interaction/TouchPositionHandler.cs +++ b/Assets/Scripts/Interaction/TouchPositionHandler.cs @@ -66,7 +66,10 @@ public class TouchPositionHandler : MonoBehaviour // 点击point1时平滑切换到camera3 if (transform.GetSiblingIndex() == 0) - var amCam = FindObjectOfType(); if (amCam != null) amCam.SwitchToCamera3Smooth(); + { + var amCam = FindObjectOfType(); + if (amCam != null) amCam.SwitchToCamera3Smooth(); + } int stepIndex = transform.GetSiblingIndex() + 1; var sm = FindObjectOfType();