Quantcast
Viewing latest article 2
Browse Latest Browse All 44

GUISkin-how to show it?

Hi all I've created a new gui skin by Assets>Create>GUISkin named mainMenuGUISkin,then I set all wanted variables for button(text color to light blue and several backgrounds which are a .png files imported) and in my script I have: public class MenuCode : MonoBehaviour { GUISkin geoscapeSkin; void OnGUI() { GUI.skin=geoscapeSkin; GUI.Button(new Rect(Screen.width/2,Screen.height/2,300,30),"Text1","button"); GUI.Button(new Rect(Screen.width/2,Screen.height/2+35,300,30),"Text2","button"); } } but there is no visible effect when I hit "play". I suspect that GUISkin geoscapeSkin defines a default skin,not mine-but how can I change that?TIt's not described clear enough in the documentation of customizing GUI :/

Viewing latest article 2
Browse Latest Browse All 44

Trending Articles