GuiTexture location matching the location of a GUI.Button

why is the texture not at the same position as the button?

var select01 : GUITexture;
function OnGUI(){
	
		if (GUI.Button (Rect ((Screen.width * 0.1) - 23, (Screen.height * 0.4) , 55, 64), "12 sec")) {
			
		select01.guiTexture.pixelInset = Rect ((Screen.width * 0.1) - 23, (Screen.height * 0.6), 65, 74);
		}

Your screen height figures are different (0.6 vs 0.4)

I got it working :slight_smile:

  • translate → position !
  • in the pixel inset set the Y to a negative value: -64
  • yes, the 0.4 of buttons must be 0.6 for GUITexture to match.