I have written a code for gui but what happens is when playing it in the editor it works perfectly but when I build the game and run it the gui overlaps after pressing button I have used code like this:
void OnGUI() {
if(CreatingNew == false && Loading == false && ClassSelection == false && HostingSelection == false) { //Creating A New Character
if(GUI.Button(new Rect(Screen.width/2-Screen.width/10, Screen.height/2 - 30, Screen.width/5, 20), "Create New")) {
CreatingNew = true;
}
to disable GUI after the button has been clicked and it disables in the editor but not in the build.
thank you for any help
↧