public static void Open(AutoTestEditor owner, Vector2 position, float buttonWidth) { var rect = new Rect(position, new Vector2(300, 800)); if (m_AddScriptEditor == null) { m_AddScriptEditor = EditorWindow.GetWindowWithRect <AddAutoTestScript>(rect, true, "添加测试脚本"); } else { m_AddScriptEditor.position = rect; } m_AddScriptEditor.m_Owner = owner; m_AddScriptEditor.m_ButtonWidth = buttonWidth; m_AddScriptEditor.Show(); }
static void OpenAutoTestWindow() { m_AutoTestEditor = EditorWindow.GetWindow <AutoTestEditor>(false, "自动化脚本"); m_AutoTestEditor.minSize = new Vector2(WindowMinWidth, WindowMinHeight); m_AutoTestEditor.Show(); }