Example #1
0
        protected static bool Remove(TrackingVolumeZone zone)
        {
            if (s_ZoneList != null)
            {
                return(s_ZoneList.Remove(zone));
            }

            return(false);
        }
Example #2
0
        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);
        }
Example #3
0
        protected virtual void Awake()
        {
            if (TrackingVolumeZone.Add(this))
            {
                TrackingVolume.Add(transform, true);
            }
            else
            {
                gameObject.SetActive(false);
            }

            elapsedTime = 0;

            if (disposeOnSceneUnload)
            {
                DisposalProxy.Dispose(gameObject);
            }
        }
Example #4
0
 protected virtual void OnDestroy()
 {
     TrackingVolumeZone.Remove(this);
 }