From e978f3beb88a83ff2fe48695e59fa1cfae95c3a4 Mon Sep 17 00:00:00 2001 From: yangbear Date: Fri, 3 Jul 2026 14:21:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20var=E5=A3=B0=E6=98=8E=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E7=94=A8=E5=B5=8C=E5=85=A5=E8=AF=AD=E5=8F=A5=EF=BC=8C=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=AE=8C=E6=95=B4if=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Interaction/TouchPositionHandler.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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();