diff --git a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs index f4b3e623..ec0c2fca 100644 --- a/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs +++ b/Assets/Zion/Scripts/ModelFunction/UAV/UnmannedAerialVehicleManage.cs @@ -238,7 +238,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour equipmentCommon.SetDatabaseInfo("bdxx", index.ToString()); } - + /// @@ -395,14 +395,19 @@ public class UnmannedAerialVehicleManage : MonoBehaviour Debug.Log(hit.distance); if (hit.distance <= 1f) { - //Debug.Log("ιšθ—δΊ†"); - gamePos.gameObject.SetActive(false); - gamemap.gameObject.SetActive(false); + if (gamemap && gamePos) + { + gamePos.gameObject.SetActive(false); + gamemap.gameObject.SetActive(false); + } } else { - gamePos.gameObject.SetActive(true); - gamemap.gameObject.SetActive(true); + if (gamemap && gamePos) + { + gamePos.gameObject.SetActive(true); + gamemap.gameObject.SetActive(true); + } } }