design menu page

hi i am alka rajput,and i am having a problem to design a menu page having play button, options,help in unity using javascript. thanks

Hello Alka, unfortunately you will need to be more specific on what you are trying to do if you wish the community to give you a good answer :-)

What you can do is take a look at the Unity GUI reference at.. http://unity3d.com/support/documentation/ScriptReference/GUI.html

In there it will show you how to implement buttons and other screen controls within Unity.

When I made my main menu, I went a lot of the lines of this script:

http://www.unifycommunity.com/wiki/index.php?title=PauseMenu

Mind you, you should really use it as a template and make your own ways of doing things, and if you do completely copy and paste, it ruins the point of making a game, as you didn't make it. Guess thats ethical though, so it does differ. But I'd go off that, see what does what, take out the pause menu part, add in some stuff you think's needed, etc.

Good luck!

try this:

var boxPosition : Rect;

var boxText : String;

var levelToLoadIfPlayIsClicked : String;

private var isShowingHelp : boolean = false;

function OnGUI()
{

    GUILayout.BeginArea(boxPosition);

    GUILayout.Box(boxText);

    if(GUILayout.Button("Play"))

        Application.LoadLevel(levelToLoadIfPlayIsClicked);

    if(GUILayout.Button("Options"))

        {

            //GUI Options stuff goes here, 

            //I don't know what you want.

        }

    if(GUILayout.Button("Help"))

        {

            //GUI Help stuff goes here, 

            //I don't know what you want.

        }

    GUILayout.EndArea();

}

Check out these pages. They cover GUI basics.

Image