public void OnClicked(Button button) { print(button.name); } //You then have to drag your button containing this script in the script area