- Home /
Load Application
How can I make my button close the current program (The main game) and open another program? Like Call of Duty 4 PC Version - It closes the single player menu and opens up the multiplayer menu
Felipe
Answer by letmeknowit · Feb 26, 2012 at 04:10 PM
Well Felipe is asking about starting external application like notepad, calc or others. try this topic.. think for a moment .. and read again :)
http://answers.unity3d.com/questions/21669/make-a-button-in-unity-to-open-an-external-windows.html
hope that help
regards letmeknowit
Answer by MithosAnnar · Feb 25, 2012 at 08:35 PM
you could try this:
function OnGUI () {
if (GUI.Button (Rect(0, 0, 20, 20) {
Application.LoadLevel("WhatEverYouCalledThisScene");
}
}
I believe the scene before you load a new one is inactive to save memory (not 100% sure of that).
I said the to CLOSE THE CURRENT PROGRA$$anonymous$$ AND OPEN ANOTHER ONE