Editor scripting, Unity 4, Project window renamed, or?

Regarding the awesome script by JSPEASE here,

There’s an odd problem when i try it in Unity 4:

for some reason it won’t find the Project window specifically - all the rest work fine.

Here’s the errors …

![alt text][1]

here’s the relevant code

window = EditorWindow.GetWindow(type, false, defaultTitle);


public WindowInfo project = new WindowInfo("UnityEditor.ProjectWindow", "Project", "Window/Project");

note that all the similar code works perfectly and moves etc. the other windows,

public WindowInfo inspector = new WindowInfo("UnityEditor.InspectorWindow", "Inspector", "Window/Inspector");
public WindowInfo hierarchy = new WindowInfo("UnityEditor.HierarchyWindow", "Hierarchy", "Window/Hierarchy");
etc etc

Here is all of the code,

the magnificent system by JSPEASE

at the original discussion here,

thanks for any ideas!

The project window is now internally called:


That window changed name again.

It went from:




And now is called:


Can someone at Unity please stop doing this?

On a second note, the hierarchy went from




Sadly I didn’t found a possibility to start a filtered search for the hierarchy. The function SetSearchFilter(string searchFilter, SearchableEditorWindow.SearchMode searchMode, bool setAll) is sadly internal.

Trying to use Events got me this far:

System.Type SceneHierarchyWindowType =
var editorWindow = EditorWindow.GetWindow(SceneHierarchyWindowType);

if (editorWindow != null)
    var e = new Event
        commandName = "Find",
        type = EventType.ExecuteCommand

This focuses the search bar, but I don’t know how to fill it with text. If anyone got an idea how to start a search, please let me know.