OnSelectionChange Without EditorWindow

Hello To All!

Is there a way to detected Changes in Hierarchy much like the EditorWindow.OnSelectionChange () but without having the editor window open?

I am writing an Editor tool that needs to detect Changes in the current scene exactly like the EditorWindow.OnSelectionChange (). Upon selection i display onScreen information about current selection and provide some manipulation options outside the tool panel.

Once script initiated the window itself does not provide any “Visual” functionality anymore. But its necessary for dispatching relative events like Update & OnSelectionChange.

It would be Useful then if i could still detect this events Without the editor window being opened. That way i can ensure that the tool still functions properly even if the designer has closed the window or has just maximised the Scene View.

i have manage to find a way to detect Update events with :

EditorApplication.update += Update;

But i cant find a way to detect selection changes!

Thanks In Advance!

Since Unity 5.2, there is now a callback Selection.selectionChange

Every time you get an Update - check whether Selection.activeObject has changed.

As far as I know, there is no way to get any of those extremely useful callbacks aside from having an EditorWindow subclass. However, I believe that docked windows will get those events, so you can just make a window and have your designers dock it next to something they actually use.