static void Init() { // Get existing open window or if none, make a new one: PhotosphereEditor window = (PhotosphereEditor)EditorWindow.GetWindow(typeof(PhotosphereEditor)); window.Show(); }
static void OnHierarchyChanged() { if (!Application.isPlaying && Resources.FindObjectsOfTypeAll(typeof(PhotosphereEditor)).Length > 0) { PhotosphereController photosphereController = GameObject.FindObjectOfType <PhotosphereController>(); if (photosphereController != null) { photosphereController.RemoveMissingPhotospheres(); PhotosphereEditor photosphereEditor = (PhotosphereEditor)EditorWindow.GetWindow(typeof(PhotosphereEditor)); photosphereEditor.CleanUpPhotospheres(); } else { Debug.LogWarning("No Photosphere Controller found, please select 'Create New Photosphere' if you want to "); } } }