Button Image Texture

hello all

can someone please tell me, how i change the sice of the texture placed in the button as icon.

or how i can add some backround to the button, using the var icon : texture;

var hover : String;
var icon : Texture2D;
var caro : String;
var White : GUISkin;

function OnGUI () {
	GUI.skin = White;
  if (GUI.Button(Rect(10,120,20,45),GUIContent(icon, "Color")))
  { 
    DoSomething(); 
  }
  hover=GUI.tooltip;
  if(hover=="Color")
  {
    GUI.Label(Rect(10,170,180,18), "Emerald Green");
  }
  
} 
 
function DoSomething () { 

		caro = "_Caro_Front_";
        GameObject.Find(caro).renderer.sharedMaterial.mainTexture = icon;
}

please help, i can’t figured out…

best regards

michael

Most of the GUI functions can take an optional parameter of type GUIStyle. This has fields called normal, hover, active, etc, for the different states of the control. These fields are of type GUIStyleState - this class has a property to set the background image for the control.