ArJ
1
Q:

how to get the name of the button pressed in unity

//this is Unity pared with C#

using UnityEngine.EventSystems;

public class Class : Monobehaviour
{
	//Call this function when the button is pressed
    public void ButtonClicked()
    {
    	string name = EventSystem.current.currentSelectedGameObject.name;
    }
}
-1

New to Communities?

Join the community