static void Init() { bool saveScene = EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo(); if (saveScene) { // Get existing open window or if none, make a new one: IconGenerator window = (IconGenerator)EditorWindow.GetWindow(typeof(IconGenerator)); window.Show(); } }
static void Init() { IconGenerator window = (IconGenerator)GetWindow(typeof(IconGenerator)); window.Show(); }