Cómo agregar el evento de OnClick dinámicamente en Unity

Button button = myButton.getComponent<Button>();
//next, try any of these:
 
//In Unity 5.6 this doesn't work
button.onClick += myMethod;
//Use this instead
button.onClick.AddListener(myMethod);
//Didn't test it
button.onClick.AddListener(delegate{MyMehtod();})
//this will unlikely work
button.onClick.AddListener(() => {MyMethod();});
Italian_Style