I am trying to make a simple game. I am trying to make it so when you hold down a UI button, an object will move. I want the object to stop moving when you let go of the button. It also needs to work on mobile. I could not find any tutorial that was thorough enough. It would be really helpful if you could explain. Thanks!
Asked
Active
Viewed 21 times
0
-
1`OnPointerDown`. I will advice you to use the `Image` or `RawImage` component instead of button. Buttons are used to detect clicks. – Programmer Jan 26 '18 at 03:19
-
@Programmer How would I implement that into the c#? – King205 Jan 26 '18 at 04:05
-
See the link from the duplicate. It has complete example for `OnPointerDown` – Programmer Jan 26 '18 at 04:09