GetComponent<Button>().onClick code example
Example: GetComponent().onClick
//Make sure you add using UnityEngine.UI;
myButton.GetComponent<Button>().onClick.AddListener(() => { someFunction(); otherFunction(); });
//Make sure you add using UnityEngine.UI;
myButton.GetComponent<Button>().onClick.AddListener(() => { someFunction(); otherFunction(); });