- Home /
How to change the way the inspector shows variables Javascript
So just a basic question hopefully.
I would like to know how to make the variable show up differently in the inspector, so instead of just a box for a number it could be a slider, or have 3 sets of numbers show up like vectors do, stuff like that.
Also is there a way so I can box off different sets of variables so I can say have one set called stuff, and then another set boxed off called stuff2.
edit* with out having to make a new script and put it into the editor folder.
Answer by aosome23 · Mar 16, 2015 at 03:46 AM
I know part of your question, are you talking about (slider)
[Range(1,6)] this will give you a slider 1-6
You could use classes for the vector3-ish things and other [stuff].
Such as : http://docs.unity3d.com/ScriptReference/Serializable.html
And this for the slider, to expand upon what @aosome23 wrote :
@Range(1,6)
public var speed : int = 0;