I somehow missed the GUI section. I will leave it to a mod to move this please. In the meantime I will be searching there ![]()
Hi, I have searched for a while, but cannot seem to find the answer to two of my questions. I have a basic main menu GUI set up, but I have two more steps before I can continue.
- How do I apply a background Image to the Main Menu, or can I? Do I have to use a scene, or can I simply use a picture I made in Photoshop?
- How do I make a menu button load a level, or (which i really want) load a new menu. For example, I have button for singleplayer. I want it when I press that button, a new menu pops up with new buttons that say like “Campaign”, “Singlemission”, etc.
screenshot of what I have : photobucket
mainmenu.js:
function OnGUI () {
GUI.Box (Rect (10,10,110,100),"");
if (GUI.Button (Rect (20,50,90,20), "Singleplayer")) {
Application.LoadLevel (1);
}
GUI.Box (Rect (1245,10,110,100),"");
if (GUI.Button (Rect (1255,50,90,20), "Multiplayer")) {
Application.LoadLevel (2);
}
GUI.Box (Rect (10,490,110,100),"");
if (GUI.Button (Rect (20,530,90,20), "Options")) {
Application.LoadLevel (3);
}
GUI.Box (Rect (1245,490,110,100),"");
if (GUI.Button (Rect (1255,530,90,20),"Exit")) {
Application.LoadLevel (4);
}
}
Any and all help appreciated!!! Thank you much. And BTW, Unity is sooooooooooooo much better than the UDK!!!