static public void CreateViewController() { Object prefab = ViewControllerManager.Instance.viewControllers[2]; GameObject go = Instantiate(prefab, ViewControllerManager.Instance.viewControllerCanvas.transform) as GameObject; CheatMenuViewController script = go.GetComponent <CheatMenuViewController>(); script.Init(); }
public void Init() { resumeButton.onClick.AddListener(Back); cheatButton.onClick.AddListener(delegate { CheatMenuViewController.CreateViewController(); }); quitButton.onClick.AddListener(delegate { Application.Quit(); }); }