[MenuItem("ERDS/GotoGameobject %g")] // %& = CTRL + ALT static void Init() { if (window != null) { CloseMe(); return; } window = (GotoGameobject)EditorWindow.GetWindow <GotoGameobject>(); window.Show(); window.isJustOpened = true; window.gameObjectName = PlayerPrefs.GetString(PREF_NAME); }
static void CloseMe() { window.Close(); window = null; }