Custom inspector Vs. Custom window
Hello guys,
for an asset I'm making, I need a very customizable sort of inspector that makes it very easy and intuitive for the user to use my asset's features. Right now I'm creating custom editor scripts that go inside the Editor folder. With this I can creat kind of custom inspectors with buttons, lists etc. Now I was wondering, there is also something like creating a custom window for your asset? What would be the difference between creating a custom inspector and creating a whole new custom window. And what are the (did)advantages? Thanks a lot!
Alexander
Answer by Adam-Mechtley · Nov 30, 2016 at 02:48 PM
Hi @alexanderameye. Basically, you should create a custom inspector if all of your controls just related to a particular object being inspected (i.e. selected). If your tool interacts with other objects in your project besides just the selected one, then an EditorWindow is the way to go.
That said, there are some places in the editor where we currently do sort of a hybrid. For example, in the inspector for a ParticleSystem, there is a button to view the controls in a separate window instead, which lets you see more information easily, since most users generally have a fairly narrow Inspector.
Hey thanks for the answer!
And is there no difference in terms of possible functionality between the inspector and a separate window? Or is the one easier than the other to script?
Neither is easier or more difficult necessarily, they just fulfill different roles. An inspector (i.e. Editor) is initialized for a particular target object or set of objects and so has some conveniences related to editing those objects. For example, it automatically creates a SerializedObject representation of the targets and responds to callbacks like OnSceneGUI(), for doing things like drawing handles.
And thank you for that ParticleSystem reference, I'll definitely take a look at that!!
Answer by makaka-org · Feb 04, 2018 at 04:24 PM
☄ Dynamic menu, Flexible Image & Field Icons in Publisher Component
Publisher Component is a decoration for your script inspector.
Now your product will always look cool.
☄ Download: http://u3d.as/YZ3
☄ Documentation: https://makaka.org/publisher-tools-unity-asset-store/
☄ Video: https://www.youtube.com/watch?v=jFOt0B2AinY
☄ Header Image & buttons with links in Publisher Window
Publisher Window is a welcome screen where the user can learn all the important information about the product (unity asset or project) and your company by visiting important links.
☄ Download: http://u3d.as/HKG
☄ Documentation: https://makaka.org/publisher-tools-unity-asset-store/
☄ Video: https://www.youtube.com/watch?v=RQ2fxox_JkU
Your answer
Follow this Question
Related Questions
How to access a Custom Editor components 1 Answer
EditorWindow and serialization of scene objects 0 Answers
Disable the selection box in the editor scene 2 Answers
How to get rect a window of editor? 0 Answers
UIElements - Horizontal scrolling is not working in ScrollView even with ScrollViewMode.Horizontal. 0 Answers