From 2d7ef4a997c0e09bcaff1b3a81596955cabfab19 Mon Sep 17 00:00:00 2001 From: yulong <1838206582@qq.com> Date: Tue, 5 Mar 2024 18:32:06 +0800 Subject: [PATCH] 1 --- .../UAV/UnmannedAerialVehicleManage.cs | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs index 4b3f222d..81f2d18e 100644 --- a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs +++ b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs @@ -348,24 +348,27 @@ public class UnmannedAerialVehicleManage : MonoBehaviour if (Spectrumdetection.Radius > 0) { - gxWRJCamera.orthographicSize = Spectrumdetection.Radius * 1000; - dzWRJCamera.orthographicSize = Spectrumdetection.Radius * 1000; - switch (Spectrumdetection.Radius) + if (gxWRJCamera&&dzWRJCamera) { - case 1: - reveal = 24; - Mapdisplay(); - break; - case 2: - reveal = 48; - Mapdisplay(); - break; - case 3: - reveal = 72; - Mapdisplay(); - break; - default: - break; + gxWRJCamera.orthographicSize = Spectrumdetection.Radius * 1000; + dzWRJCamera.orthographicSize = Spectrumdetection.Radius * 1000; + switch (Spectrumdetection.Radius) + { + case 1: + reveal = 24; + Mapdisplay(); + break; + case 2: + reveal = 48; + Mapdisplay(); + break; + case 3: + reveal = 72; + Mapdisplay(); + break; + default: + break; + } } } }