- Home /
Question by
faridphenom · Jul 28, 2017 at 01:00 PM ·
unity 5event
onpointerdown eventsystem
Hi, i'm building a 2d game and i want to have a touch button, when i use repeatbutton it doesn't work and i don't know why. So i use a ui button and attached a scripted on it to detect that is pressed or not? for this i used OnPointerDown/up and then in character scripted when i call this function it needs a pointereventdata and i don't know what to passed it here?
Comment
Answer by look001 · Jul 28, 2017 at 02:00 PM
Im not sure if i understand you question correctly. The UI button has an OnClick component. In that component you can set a method that will be called if you press the button.
What you saying is when user click on it, but i want to being pressed and held it down until user let it go. Like Get$$anonymous$$ey.