I’ve been trying to create a simple menu with 2 entries. Both of the entries are supposed to open the same scene, the only different thing is that a boolean is set depending on which entry is pressed.
This is some additional code that just makes is clearer why I need
if ( MenuScript.automate == true)
runAutomatically ();
else if (MenuScript.automate == false)
runOnKeyInput ();
I need to mention that I have added the MenuScript to my empty MenuController game object and I have added box colliders for the 2 entries in the menu.
Are you sure that the Raycast is hitting the buttons? Try adding Debug.Log() statements. Or consider using OnGUI() instead of GUIText. You could replace Update() with: