Answer the question
In order to leave comments, you need to log in
How to make an addition at different speeds?
I have buttons (like a picture with an Event Trigger) + - , I need to have + - 1 when I click, and if you hold + - it will quickly add or subtract ...
I tried to put on Event Trigger click, then one by one was added and subtracted, set Down, it still only counted once, I think you need to go through the update, but I also tried it, that is, set the start of pressing Down and then stop counting when Up, but there is a small problem - it immediately counts at a fast speed, but I need to it was considered if, for example, the button was held for more than a second ...
How can I do this?
Answer the question
In order to leave comments, you need to log in
You set the isPressed flag on down and plus on the update until you remove the flag on Up. You may need to add an additional timer first, as during one update, not everyone can finish the click.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question