Button OnClick end?

Hi guys,

I have an UI Button used for moving a character. I noticed that i can use OnClick() method for detecting when a user tap the button. But what if i want to notice when the user leaves his finger from the button? Is there in Unity some function like “OnClickEnd()”? I really need to "do something " when the user release the button.

Best regards.

You can add an EventTrigger component to the button and use the PointerUp event or use a script with use Redirecting to latest version of com.unity.ugui.