private static void OpenWindow()
    {
        if (mInstance)
        {
            return;
        }

        mInstance = EditorWindow.CreateInstance <EditorWindowTemplate>();
        mInstance.Show();
    }
Beispiel #2
0
    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( );
    }