- Home /
GUI.Button Texture Problem - Simple?
Hello,
I have a GUI button that has a texture instead of text. Is there a way to get rid of the typical button border:
As you can see - there is a border going around the texture.
Cheers folks!
Do you want to be able to click the whole button or just the image? Because if you want the whole button, you can change it by changing the current GUI Skin.
Answer by Jake-L · Apr 01, 2011 at 05:50 PM
Like Xedfire said, e.g.
GUILayout.Button(myTexture,"label");
would be a way.
This works - but how do I adjust the position of it?
You could use GUI.Button(new rect(10,10,100,100),myTexture,"label").
See http://unity3d.com/support/documentation/Components/gui-Layout.html for more details on positioning and layout.
Answer by Kenneth · Nov 20, 2011 at 10:11 AM
Posting this for others, took me forever to find the answer for this. You have to add a blank string at the end, and the button background will go away.
GUI.Button(new rect(10,10,100,100),myTexture,"")
Your answer
Follow this Question
Related Questions
Make a Button out of a Textured Plane 2 Answers
Problem With GUI Circle Thickness 0 Answers
Buttons and images 1 Answer
GUI Button Texture only showing as small 1 Answer
GUI buttons look fine on full screen but distorted otherwise? 0 Answers