public Layer(string layerName, Transform anchor = null) { name = layerName; transform = new GameObject(layerName).transform; TrackingVolume.Add(transform); if (anchor != null) { SetAnchor(anchor); } TrackingVolumeLayers.Add(this); }
protected virtual void Awake() { if (TrackingVolumeZone.Add(this)) { TrackingVolume.Add(transform, true); } else { gameObject.SetActive(false); } elapsedTime = 0; if (disposeOnSceneUnload) { DisposalProxy.Dispose(gameObject); } }