Button UI

When I went about making my ui button I went about it the wrong way at first. I created a black buttonbg to apply as a var Texture2D and then use the String in the GUI.button

one of many scripts

var icon : Texture2D

if(GUI.button (Rect(x.x.x.x), “Button Text” icon))

and just drop the empty background on each one and just change the “Button Text” for the text on the button, but i found it kept giving me errors. I found out that you can only use “Button Text” or icon not both so I made individual buttons and removed the “Button Text” and it all worked.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: