if(currentHealth == maxHealth){
GUI.Label (Rect (Screen.width / 2, Screen.height / 1.105, 1024, 24), full);
}
The position of the GUI is very obviously not in the middle of the screen. help?
if(currentHealth == maxHealth){
GUI.Label (Rect (Screen.width / 2, Screen.height / 1.105, 1024, 24), full);
}
The position of the GUI is very obviously not in the middle of the screen. help?
GUI elements are typically placed from the upper lefthand corner, this means you’ll need to also reduce the x-position by half of the length of the GUI element.
Try this:
if(currentHealth == maxHealth){
GUI.Label(Rect((Screen.width/2) - 512, Screen.height/1.105, 1024, 24), full);
}