How to make texture fit in GUI button?

i have a button and texture is small it dosen’t fit into the whole button i have to make it to fit in the button.Is there any way of doing this without changing to GUI box?


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.