using UnityEditor; using UnityEngine; public static class Hoge { [InitializeOnLoadMethod] private static void OnChangedCurrentScene() { EditorApplicationUtils.mChangedCurrentScene = currentScene => { Debug.Log( currentScene ); }; } }
例えばエディタ編集中にUI用のシーンを開いた時に
Sceneビューの表示を2Dモードに変更するなど行いたい時に役に立ちます