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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Functional "Start" Button? [SOLVED]

Discussion in 'Scripting' started by radler470, Jan 13, 2015.

  1. radler470

    radler470

    Joined:
    Dec 3, 2014
    Posts:
    86
    At it's core, I'm not sure if this is a GUI or a Scripting question, but there seems to be better support on this end of the forum. My question is this:

    I have a simple first person controlled game, using a crosshair, with the mouse locked to the center of the screen.

    I am looking to have some kind of a Start button at the beginning, but I don't want the user to be able to navigate anything without first visiting this Start menu (that may have instructions as well, but at this point just a simple start button would suffice). Ideally, the game would be grayed out, or something along those lines, until the user hit the Start button to initiate the game.

    Any ideas or resources on how to do this? Much appreciated!
     
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    GUI.Button() ???
     
  3. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    UI.Button is better, if you are in 4.6. Put a white panel behind it with an intermediate alpha value, and you have just greyed out your screen.
     
    radler470 likes this.
  4. dvirus1023

    dvirus1023

    Joined:
    Mar 4, 2013
    Posts:
    51
    Create a Start scene and create the button with the new UI. On the button click, call Application.LoadLevel("Game"); or whatever your game scene is called.