This commit is contained in:
账号名 2024-01-28 17:25:54 +08:00
parent eeb9868254
commit dabbcc0ebf
1 changed files with 3 additions and 1 deletions

View File

@ -1029,6 +1029,8 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
}
private void OnDestroy()
{
if (airRoute)
Destroy(airRoute.gameObject);
for (int i = 0; i < unmannedAerialVehicleManages.Count; i++)
{
if (unmannedAerialVehicleManages[i] == null)
@ -1038,7 +1040,7 @@ public class UnmannedAerialVehicleManage : MonoBehaviour
}
StopCoroutine(ShowRadarTips(0, 0));
OnActivationChanged -= OnActivationChangedHandler;
Destroy(airRoute.gameObject);
}