How do i get current pressed UI button on Android. I am using GameObject thisbutton = UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject;
But i am getting null reference on Andoird logcat. Works fine on editor
How do i get current pressed UI button on Android. I am using GameObject thisbutton = UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject;
But i am getting null reference on Andoird logcat. Works fine on editor
Call this function when the button is pressed
public void ButtonClicked()
{
string name = EventSystem.current.currentSelectedGameObject.name;
}