Should I use Inspector or custom editor window?

I am creating a character dev system and would like to know if I should use the inspector or a customised window. It will be used to morph the character, select clothing and accessories and other things. These will also need to be accessed during runtime through an API.

Any advice would be great :slight_smile:

This question is actually a bit “vague” as it highly depends on the actual actions you want to perform and how many objects are involved.

I’m not sure how this is actually relevant here:

These will also need to be accessed
during runtime through an API

Custom inspectors as well as editor windows are pure editor classes which don’t exist at runtime at all. Where and how you store your data is a completely different topic.

In general it’s recommended to use:

  • a custom inspector when you only work on a single object. A good example is Unity’s terrain editor which is implemented in a custom inspector. Keep in mind that when you “deselect” that object the inspector will be gone. This makes it difficult when working with several objects / assets.
  • an editor window when you want to have some sort of wizard or simply a more complex setup. In more complex systems you usually use both, an editor window as well as some custom inspectors. The editor window would represent your actual “workspace”. Now you can select (either manually or semi-automatic) other objects / assets which will now show up in the inspector for editing. A good example here is the Mecanim editor or the Animation editor. Those require constantly selecting / dealing with other objects and thus a custom inspector would be a bad choice.

So it all boils down to how many objects are involved.

Also keep in mind that the inspector window is usually a rather narrow, tall window, so it’s difficult to display things that require a certain width. Having to resize the inspector to display all your content is a good indicator that you might want to use a seperate editor window instead.

Generally it doesn’t matter. It’s always a question about usability, graphical interface design and the workflow idea. If you want to create this to sell or distribute to other users you might want to stay as close to the basic workflow Unity uses itself.