Answers for "getcomponent of button which is clicked"

C#
0

GetComponent<Button>().onClick

//Make sure you add using UnityEngine.UI;
myButton.GetComponent<Button>().onClick.AddListener(() => { someFunction(); otherFunction(); });
Posted by: Guest on February-21-2021

Code answers related to "getcomponent of button which is clicked"

C# Answers by Framework

Browse Popular Code Answers by Language