I have a very simple problem, but I trough it should be easier.
What I need is:
1 - While some mouse button is pressed, a counter starts running on a loop, it goes from 1 to 5. When the counter reaches 5, it stars again from 1.
What I’ve done already:
1 - I can detect when mouse button is pressed and released whitout any problem. So that’s not a problem.
2 - I tried to make a loop using “for” and later “while” but Unity3D crashes. So I tried time.deltaTime, but I don’t know how to count the time while mouse is pressed.