Skip to content

October 28, 2021

unity

[Unity] Button Event: OnPointerDown() and OnPointerUp()

Last Updated on 2021-10-28 by Clay

The button component is built in the Unity UI layout, so we can simply to create the function to trigger the button event when user clicking. But if it is necessary to set the events of the button “pressed” and “released” separately, we can write a script to inherit the Button class, and override the OnPointerDown() event and OnPointerUp() event.

Read More »[Unity] Button Event: OnPointerDown() and OnPointerUp()