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?
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.