private static void DiffInit() { // Only call Init() if the scene has changed. if (_previousScene != SceneManagerEditor.CurrentScene) { // Init(); // Add the new scene. LayerManager.AddActiveScene(); ZMToggleLayerWindow._previousScene = SceneManagerEditor.CurrentScene; Debug.Log("update previous scene"); } }
public static void Init() { var numScenes = SceneManagerEditor.SceneCount; LayerManager.Clear(); LayerManager._layerConfigurations = new Dictionary <SceneWrapper, LayerConfiguration>(numScenes); for (int i = 0; i < numScenes; ++i) { var configuration = new LayerConfiguration(); _layerConfigurations.Add(SceneManagerEditor.GetSceneAtIndex(i), configuration); } LayerManager.AddActiveScene(); }