Answers for "button listener unity"

C#
1

button listener unity

[SerializeField] private Button listenTo;

void Start() {
 	this.listenTo.onClick.AddListener(Listener);	 
}

void Listener() {
  // Do something
}
Posted by: Guest on July-01-2021

C# Answers by Framework

Browse Popular Code Answers by Language