Issue? For loops run slower while viewing object in inspector
In the first screenshot, if you look in the inspector down nearer the bottom of the controller script at the Attack cooldown and base attack cooldown functions, attack cooldown is supposed to be decrementing once per frame.
In the second screenshot, you'll see i've clicked off of the character I was viewing, herein lies the issue.
When viewing the object in the editor with a loop decrementing a value and said object moving over a vector at the same time, the loop slows way down in decrement (and I assume increment as well, have not tested) compared to if the character is standing still.
This causes the cooldowns to happen much slower than if standing still, not just the number decrementing in the editor, but in game too. However, if I click off the character I'm viewing onto another in game object and do the same thing (move while using an action that will start a loop with a decrement on a value in the characters variables), the actions happen as fast as i expect them to whether the character is moving or not.
Any ideas?
Your answer
Follow this Question
Related Questions
For loop comparing two different objects appears to not be running 1 Answer
Handles.DotHandleCap ztest issue 0 Answers
2D Character shakes when moving diagonally 0 Answers
How to reduce editor refresh time? 0 Answers
Is the glitch fixed? 0 Answers