- Home /
Question by
davidbirch · Apr 11, 2017 at 03:39 AM ·
c#guiskin
c# reference multiple guiskins
I'd like to reference multiple skins to be able to change the style of a label
public GUISkin skin;
public GUISkin increaseSkin;
public GUISkin decreaseSkin;
i assign them like this
however when i open the script in the debugger only the first skin variable is assigned, the other two are null
any idea whats going on? this one has be stumped
skins.png
(8.9 kB)
Comment
Best Answer
Answer by UnityCoach · Apr 11, 2017 at 08:27 AM
It seems you assigned "default" values at the script level. If this is a MonoBehaviour, and you assigned it to a game object, then make sure it has the same values assigned.
thank you, it is exactly this, i knew it'd be something silly like this!