Tombol AddListener Unity

//you probably want to remove existing listener before adding a new one
//myButtonGameObject.GetComponent<Button>().onClick.RemoveAllListeners();
myButtonGameObject.GetComponent<Button>().onClick.AddListener(delegate { MyMethodToPass(); });
IvanTroho