- Home /
Question by
arman_gamer · Jan 18, 2014 at 02:48 PM ·
androidguiresolution
problem with gui???
hello, i create a new project with unity 4.2. in this game i create a GUI code and write in the this code :
function OnGUI()
{
GUI.Label(Rect(Screen.width/2 ,Screen.height/2-280,100,200),"Level :"+level);
GUI.Label(Rect(Screen.width/2,Screen.height/2-250,100,200),"Score :"+score);
GUI.Label(Rect(Screen.width/2,Screen.height/2-220,500,200),"Finish Score :"+finishScore);
if( gui==1)
{
GameOver=true;
}
if(GameOver==true)
{
GUI.Label(Rect(Screen.width/2-100,Screen.height/2-40,400,100),"GAME OVER");
if(GUI.Button(Rect(Screen.width/2-100,Screen.height/2,200,100),"Restart"))
{
Application.LoadLevel("game");
score=0;
lives=3;
}
if(GUI.Button(Rect(Screen.width/2-100,Screen.height/2+100,200,100),"Exit"))
{
Application.Quit();
}
}
}
now, i have problem with this code : i build this project in android and this gui.lable change position in my phone except somethings,i want to stick my lable to the left of the screen in my phone. or if this Impossible please guide me how to change screen resolution fix to any phone if this write is bad im sorry, i can't speak English well thank you for your reply
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613130754im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Android problem (building and running the game) 1 Answer
Resolution for assets on Android 1 Answer
Android Screen Resolution (Joysticks) help. 2 Answers
Resolution Multiplier on Android 1 Answer