Saturday, November 10, 2012

Unity How to Create Main Menu

Well, I am not going to write tutorial as others have done it so well

below is the best tutorial i found on the net

http://active.tutsplus.com/tutorials/unity/getting-started-with-unity-finishing-our-game-with-a-menu/


summary
1. Create 2 scene, example "MainMenu", "Level1", open build setting and drag them in, make sure main menu scene on top
2. Game Object -> Create Other -> 3D Text, name it "PlayButton"
3. Create a java script, paste in this code, and drag it to your 3D text(PlayButton)


function OnMouseDown()
{
    // if we clicked the play button
    if (this.name == "PlayButton")
    {
        // load the game
        Application.LoadLevel("Level1");
    }
}

4. Click play and when you click the PlayButton it load level 1



No comments:

Post a Comment