private void OnEnable() { // ActionOnEnable(); // uncomment to use textures right away RuntimeBakedLightmapUtils.AddInstanceRef(this); PrefabBakerManager.AddInstance(this); SceneManager.sceneLoaded += OnSceneLoaded; }
private void OnDisable() { // ActionOnDisable(); // uncomment to use textures right away RuntimeBakedLightmapUtils.RemoveInstanceRef(this); // RefAdded = false; PrefabBakerManager.RemoveInstance(this); SceneManager.sceneLoaded -= OnSceneLoaded; }