static void OpenWindow() { Rect wr = new Rect(0, 0, 500, 500); EditorWindowTest window = (EditorWindowTest)EditorWindow.GetWindowWithRect(typeof(EditorWindowTest), wr, true, "测试创建窗口"); window.Show(); }
private static void ShowWindow() { EditorWindowTest myWindow = (EditorWindowTest)EditorWindow.GetWindow(typeof(EditorWindowTest), false, "MyWindow", true);//创建窗口 myWindow.titleContent = new GUIContent("WindowTest"); myWindow.Show(); }