The Transparent boarder in a button

Hi.

I’m making some button for my HUD using “GUI.Button” function. I made a texture for it using photoshop. How can I make a button just using this texture. I mean, I don’t want the transparent boarder. How can I omit it?

GUI.Button(Rect (x,y,width,height),Your_image,GUIStyle.none); add GUIStyle.none at the end, you button will now be only the texture!

on the project view, right click Create-> GUISkin

drag this asset on the default references

on the inspector, you can modify your button, either normal, hover, active or focused. You can change the texture to none.

then add this on your script:

var [name of your gui skin] : GUISkin;

function OnGUI () {

GUI.skin = [name of your gui skin];