Search Unity

How to get current pressed UI button

Discussion in 'Android' started by witcher101, Sep 17, 2021.

  1. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    How to get the current pressed UI button on android.
    I tried using
    GameObject thisbutton = UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject;

    But this returns null reference on android. But works fine on editor.