Example #1
0
    // Use this for initialization
    public void Start()
    {
        uiMgr = GameObject.FindWithTag("UIManager");

        menuMgr    = uiMgr.GetComponent <MainMenu_UIManager> ();
        components = gameObject.GetComponentsInChildren <Button>();
    }
Example #2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != null)
     {
         Debug.Log("Instance already exists, destroying object!");
         Destroy(this);
     }
 }