If someone could help me out here, that’d be great. I have a VERY basic GUI consisting of a text field and two buttons. One says “Play” and the other says “About”.
Here is my code so far:
function OnGUI () {
if (GUI.Button (Rect (280,215,120,30), "Play")) {
Application.LoadLevel (2);
}
if (GUI.Button (Rect (280,260,120,30), "About")) {
Application.LoadLevel (3);
}
}
Here’s what I have setup:
Level 1 is the GUI. Level 2 is really the first level the user gets to play. However, Level 2 refuses to load. After Application.LoadLevel, should I have (2) or (Level2) because the file in my project is named “Level2”.
AND, how to I get the second GUIButton to go to a designated URL? Right now, I have it set to go to Level 3 but that’s just to fill it. What would I put to get it to redirect the user to a designated URL?
EDIT:
Sorry guys, I got the numbers messed up with the loader order! I now have level two loading by putting it in the build settings and changing the destination of Button 1 to level 1 instead of level 2 (in the build settings, my gui loader is considered to be level 0) but I still need help with the URL question.