- Home /
how to give title for group of variables?
i have group of var
/*preformance*/
public float upDateSpeed=1;
public float upDatePower=1;
/*info*/
public float MaxSpeed=30;
public float MaxSteering=6;
i want the title show in unity scrip on the editor gui (in the inspector) can i do it?
Comment
Best Answer
Answer by TropicalTrevor · Mar 16, 2014 at 04:45 PM
I'm afraid that you'll have to create a custom inspector:
http://docs.unity3d.com/Documentation/Components/editor-CustomEditors.html
You will need to draw the text with GUILayout.Label("performance")
and then use
EditorGUILayout.FloatField
or other appropriate fields (IntField, TextureField etcetera) to draw all your variables in the places you want them to be displayed. just follow the explanation in the documentation, or let it go and don't do it because if this is all you want to do an editor script may actually be a little overkill.