GUI button resizing makes button disappear?

Hi,

I’m trying to get some buttons done, and it seems that when I attempt to resize the button to fit the screen resolution it just makes the buttons disappear. I’ve no clue why this is happening, as when I use a variable for the height and width and manually assign the right values to those, and then resize those values instead of homeButton.width/height, it works fine. Why is this any different?

Any idea’s? Thanks in advance!

~Nick

 if(GUI.Button(Rect (
 scrnWidth/100*homeButtonPos[0]-(homeButton.width/2),
 scrnHeight/100*homeButtonPos[1]-(homeButton.height/2), 
 homeButton.width/1600*scrnWidth, homeButton.height/900*scrnHeight
 ),homeButton, style))
 {
 Application.LoadLevel(homeIndex);
 }

NOTE: the 1600x900 is the resolution I designed my buttons for, hence I divide the width and height by those values.

try to remove style.

I’m trying to increase the button’s text size, but if I add GUIStyle or SkinStyle the button disappear and only show the text :confused: