How do you make a 2D Texture cover the whole button? When I write
GUI.Button (Rect (0,0,50,50),texture);
the texture turns out like this:[23917-screen+shot+2014-03-19+at+7.09.46+pm.png|23917]
How do I make it so that the texture covers the whole button?
Use GUIStyle for applying Texture to a button.
Instead of using Texture2D try using GUIStyle and add your custom Style.
Sample code:
var style_1:GUIStyle;
GUI.Button(Rect (0,0,100,100),“”,style_1);
then click and drag your custom texture to the button.
If u have doubt follow this link:
hope this may help you.