private void setup() { referencesRemovedCount = 0; contentCacheGameObject = SceneRefs.Get <PrefabCacheTracker>(); if (contentCacheGameObject != null) { contentCacheGameObject.ReferencesRemoved += onReferencesRemoved; } Service.Get <EventDispatcher>().AddListener <SceneTransitionEvents.SceneSwapLoadStarted>(onSceneSwapLoadStarted); isSetup = true; }
private void Awake() { prefabCacheTracker = base.gameObject.AddComponent <PrefabCacheTracker>(); SceneRefs.Set(prefabCacheTracker); }
private void Start() { prefabCacheTracker = SceneRefs.Get <PrefabCacheTracker>(); sceneLayoutListener = dataEntityCollection.Whenever <SceneLayoutData>(sceneDataEntityHandle, onLayoutAdded, onLayoutRemoved); }