Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Creating a game menu in c#

Discussion in 'Scripting' started by RedStag, Sep 27, 2014.

  1. RedStag

    RedStag

    Joined:
    Sep 21, 2014
    Posts:
    3
    Hey guys!

    Total newbie to unity, programming and coding (other than having a 48 hour crash course a few weekends ago - I emphasise the word "crash").

    Basically I want to create a menu for a 2d game, coding in c#. Background and text have been added, no worries at all - I have also made a few scenes for the various menu headings. I don't have the first clue what code to type in to make any of it work. :)

    So just think in terms of:
    Main menu
    - link to scene 1
    - link to scene 2
    - link to scene 3

    All help is appreciated! I'll be making notes on all the comments so hopefully I won't have to ask any dumb questions twice.
     
  2. Suddoha

    Suddoha

    Joined:
    Nov 9, 2013
    Posts:
    2,824
    Old system:
    Have you already had a look into this guide?
    Alternatively, there's also the GuiLayout class which helps to automatically layout your GUI, but if you need much control you should rather have a look at GUI.

    New system:
    However, if you want to try something new & cool, check out Unity 4.6. It has got a new GUI system which appears to me more efficient, advanced and user friendly. There are already nice tutorials which can be found on youtube or even in this forum.
     
  3. RedStag

    RedStag

    Joined:
    Sep 21, 2014
    Posts:
    3
    Thanks, I'll check it out. :)
     
  4. NickHaldon

    NickHaldon

    Joined:
    Mar 19, 2014
    Posts:
    128
    Here is a tutorial that was really helpful for me. I don't know if its the best way to do things as I am a newbie also. :)


    You might have to skip forward a couple of videos. He also makes a more detailed 3D menu later on but I haven't seen it so I cant say if its good or not. Its all in C# also.

    Edit: I switched the video to the actual Main Menu one. I would still recommend watching the entire course as its really good.