- Home /
Question by
Davidflynn · Dec 16, 2011 at 04:05 AM ·
gui
GUI text Stays in place
I'm trying to make it so that my GUI text stays in place no matter what size phone you place it on. I want it to be in the bottom of the screen centered on any phone it may get put on.
This is what I have:
function OnGUI(){
GUI.skin = myskin;
GUI.Label (Rect (310, 450, 200, 30), "Life: " +lives);
GUI.Label (Rect (100, 450, 200, 30), "Enemys Remaining: " +enemy);
}
Comment
Answer by crazyKnight · Dec 16, 2011 at 05:06 AM
use this for rect
Rect(x*(Screen.width)/100,y*(Screen.height)/100,width*(Screen.width)/100,height*(Screen.width)/100)
it's position will not change then