- Home /
Question by
MyReallyLongName · May 25, 2014 at 08:57 AM ·
c#windows phone 8wp8
OnGUI not working on device
Hi!
So I'm working on a prototype for a game and I want to create a simple main menu with one button. Here's the problem: The button works fine in the player and it works fine when I made a Web player build, but it doesn't seem to show up on my Windows Phone (I have done other projects with Windows Phone 8 in which the GUI has worked).
This is all there is to the code that I'm using:
void OnGUI(){
if(GUI.Button(new Rect(Screen.width * 0.1f, Screen.height * 0.25f, Screen.width * 0.8f, Screen.height * 0.15f), "Play")){
Application.LoadLevel("play");
}
}
Any ideas?
EDIT: I tested this on my Android tablet device and it works fine, looks like the issue is exclusive to Windows Phone
Comment