Skip to content

Instantly share code, notes, and snippets.

@maxbye3 maxbye3/MenuSystem.cs
Last active Nov 16, 2015

What would you like to do?
This script accompanies basic button setup and disappear the button
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class MenuSystem : MonoBehaviour {
public GameObject startGame;
public GameObject options;
// Use this for initialization
void Start () {
Button startBtn = menuCanvas.transform.Find ("Main Menu").Find ("Start Game").GetComponent<Button> ();
Button optionBtn = menuCanvas.transform.Find ("Main Menu").Find ("Options").GetComponent<Button> ();
startBtn.onClick.AddListener (() => {
Debug.Log ("Start Game");
// Remove the start button
});// start button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.