Beispiel #1
0
    public static T CreateBase <T>(string title, string sourcesPath, int minWidth, int minHeight, int maxWidth, int maxHeight) where T : WebViewEditorWindow
    {
        T window = EditorWindow.GetWindow <T>(title);

        WebViewEditorWindow.CreateWindowCommon <T>((T)((object)window), title, sourcesPath, minWidth, minHeight, maxWidth, maxHeight);
        window.Show();
        return(window);
    }
Beispiel #2
0
    public static T CreateUtility <T>(string title, string sourcesPath, int minWidth, int minHeight, int maxWidth, int maxHeight) where T : WebViewEditorWindow
    {
        T t = ScriptableObject.CreateInstance <T>();

        t.m_GlobalObjectTypeName = typeof(T).FullName;
        WebViewEditorWindow.CreateWindowCommon <T>((T)((object)t), title, sourcesPath, minWidth, minHeight, maxWidth, maxHeight);
        t.ShowUtility();
        return(t);
    }