private void Start() { _menu = new MenuController(_menuTextPrefab, _menuButtonPrefab); _menu.Button.onClick.AddListener(StartGame); StartGame(); }
public void Start() { var scene = transform.root; _menuController = (MenuController)scene.GetComponent(typeof(MenuController)); _menuLabel = transform.GetComponentInChildren<MenuLabel>(); }