Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

GetComponent

//Make sure you add using UnityEngine.UI;
myButton.GetComponent<Button>().onClick.AddListener(() => { someFunction(); otherFunction(); }); 
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+5 =