How can I program a script to be usable in inspector panel ?

Hi…

I need to create a script that has 3 different behaviors.
What I´m looking for is to set an Enum with 3 options, then on Inspector panel, user chooses one of those 3 options and depending the selected option, appear the vars that use only that option…

For instance:

On the inspector panel of a GameObject on the script it only shows “SelectOption” enum (and nothing else).
User chooses an option, just at the moment he make its choice, more options will come on inspector, but those option are according to the selected option only… This helps to better arrangement …

Thanks in advance.

Once you understand how to build a custom editor, this will be super easy.

Start here: Editor Scripting - Unity Learn

2 Likes

Thanks.