How can i use a PNG image file has a button?

I have been searching for HOURS in how to create a button for my game. A lot of forums suggest GuiButton and Texture; my Teacher suggest GuiText and Texture…I have no clue in what to do.

I have created a button in png using GIMP, can I use it for a button? if so, how can i incorporate it?

I’m using C# scripting for my android game.

Thanks in advance

Are you using OnGUI or 4.6 UI? The technique is quite different. UI is probably easier, if you are allowed to use it.

1 Answer

1

The documentation page here:

shows how you can make a clickable button with an image on it. The example assumes that you have drag and dropped the PNG into Unity, and Unity has converted it into a Texture2D asset.

SOOOO CLOSE.......it work in a way. how do i make the button adjust to the size of the texture and how do i remove the square background of the button? Thanks in advacen