protected static bool Remove(TrackingVolumeZone zone) { if (s_ZoneList != null) { return(s_ZoneList.Remove(zone)); } return(false); }
protected static bool Add(TrackingVolumeZone zone) { if (s_ZoneList == null) { s_ZoneList = new HashSet <TrackingVolumeZone>(); } if (!s_ZoneList.Any(z => z && z.name == zone.name)) { return(s_ZoneList.Add(zone)); } return(false); }
protected virtual void Awake() { if (TrackingVolumeZone.Add(this)) { TrackingVolume.Add(transform, true); } else { gameObject.SetActive(false); } elapsedTime = 0; if (disposeOnSceneUnload) { DisposalProxy.Dispose(gameObject); } }
protected virtual void OnDestroy() { TrackingVolumeZone.Remove(this); }