void CreateCheatButton(string title, CheatActionDelegate dele) { GameObject go = Instantiate(cheatCell, cheatListTransform); CheatCell script = go.GetComponent <CheatCell>(); script.InitCell(title, dele); }
public void InitCell(string desc, CheatActionDelegate actionDelegate) { description.text = desc; cheatButton.onClick.AddListener(delegate { actionDelegate(); }); }