Search Unity

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

Discussion in 'Scripting' started by U7Games, Aug 6, 2018.

  1. U7Games

    U7Games

    Joined:
    May 21, 2011
    Posts:
    943
    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.
     
  2. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    Kiwasi and U7Games like this.
  3. U7Games

    U7Games

    Joined:
    May 21, 2011
    Posts:
    943
    Thanks.