- Home /
Use of the inspector along with a custom editorwindow
Hi !
I wanted to know if it is possible to use the inspector with a custom editorwindow of mine ?
Why I want to do that : to keep stuff seperated the editor window for the visual representation, and the inspector for the editing. Doing it all inside the editorwindow can be pretty boring I think :/
For instance I have a class Node which is represented by a rectangle in the editorwindow, which got a public field named "node_name".
What I want : If a click on the rectangle in the editorwindow then the Node object corresponding to that rectangle is selected in the inspector and I'm able to modify his "node_name" by the inspector.
I couldn't find out if it's possible, is it ?
Thanks for any help !
I am also interested in knowing if/how this is possible.
Hey,
Yep this is totally possible, if your Node class is derived from ScriptableObject you can update Unitys selection from your editor window by setting Selection.objects to an array containing your node object or objects and the inspector will show the editor.
Your answer
Follow this Question
Related Questions
Create an Editor Window like Mecanim 1 Answer
Referencing / linking a .asset / .prefab file in another .asset / .prefab file programmatically. 2 Answers
How to have two inspectors of different types thats objects they are inspecting change 0 Answers
Using Handles in EditorWindow 0 Answers
How to know if something is selected in Hierarchy or in project. 5 Answers