Search Unity

Load Level

Discussion in 'UGUI & TextMesh Pro' started by tygoo7, Aug 27, 2014.

  1. tygoo7

    tygoo7

    Joined:
    May 6, 2013
    Posts:
    68
    How would I make the new UI buttons load a level when clicked? I can't seem to figure it out.
     
  2. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Create a script with a method to load the level. The method must be public, have a return type of void, and have valid arguments.

    Attach the script to a GameObject. (Your button is a GameObject...)

    Drag the GameObject into the OnClick section

    Choose the appropriate method.

    And you are done.
     
  3. tygoo7

    tygoo7

    Joined:
    May 6, 2013
    Posts:
    68
    Thank you!