private static void OpenWindow() { if (mInstance) { return; } mInstance = EditorWindow.CreateInstance <EditorWindowTemplate>(); mInstance.Show(); }
static void Init( ) { // Get the window, cast it from a generic EditorWindow // to the specific child class. Show the window. EditorWindowTemplate window = (EditorWindowTemplate)EditorWindow.GetWindow( t: typeof(EditorWindowTemplate), utility: false, title: "My Editor", focus: true); window.Show( ); }