Hello i made a game in nity
I placed some buttons in my GUI.
A start button and a quit button In the center of the screen
i got a 1920x1080 screen when i use the display resolution and click 1920x1080 and run it the buttons work perfectly
but when i disable display resolution dialog my buttons wont work anymore?
they only work if i click left to the button.
u know how to fix this?
Watch this better explaining.
using UnityEngine;
using System.Collections;
public class GuiButtons : MonoBehaviour {
void OnGUI () {
// Make the first button. If it is pressed, Application.Loadlevel (1) will be executed
if(GUI.Button(new Rect(Screen.width/2 - 40, Screen.height/2 + 30,90,40), "Start")) {
Application.LoadLevel(0);
}
// Make the second button.
if(GUI.Button(new Rect(Screen.width/2 - 40, Screen.height/2 + 80,90,40), "End")) {
Application.Quit ();
}
}
}