- Home /
GUIStyle in an inspector array
When I use a single GUIStyle in my GameObject, it works : my label is visible. But when I use a GUIStyle array, filled in the inspector, there is no text in my label
First case declaration :
public GUIStyle myStyle;
First case use :
GUI.Label(new Rect(0, 0, 100, 30), "Test Label", myStyle);
Second case declaration :
public GUIStyle[] myStyle;
Second case use :
GUI.Label(new Rect(0, 0, 100, 30), "Test Label", myStyle[0]);
Someone has an explain ?
Comment