I’m now debugging a battle. (in my game)
My game has basically lots of animation which is running.
but even though, if I press ‘pause’ button, game stops.
but I think Frame Debugger can’t do this.
I mean, it can not hold a frame.
If I select draw call from lots of draw calls, I can see some of my characters move in a split second and stop. (I can check this on scene)
and further more, the draw calls which are shown in Frame Debug Window are going different. because time is running.
I am assuming that selecting a single draw call makes single frame passes.
I can see this phenomenon goes serious if I click a single draw call and use arrow key (up, down) selecting several draw calls.
If I do this, Scene view is showing something like old TV animation …
Is there anyone who has encountered something like this?
It would be better if you know solution.
- This is not happening all the time. If I use frame debugger on main menu which has less animation on scene than battle, frame debugger is okay.
I was fallen into the same situation like you, and I think I have the solution, at least it works for me.
Yes you are right, when you click a different drawcall on the Frame Debugger, the Unity pass a frame. All monobehaviors excute their Update methods once, but no FixedUpdate, surprisely. So, logic in Update will run! Unity do the pause magic with the API Time. When the game is paused, Time.scale is zero, Time.deltaTime will be zero and Time.time will not change in the next frame. So the animation and particles will stay the same, and the logic in Update calculated with the above two value will stay too. If not with them, they will make change even if the Editor is Paused. By the way, the Time.unscaledTime and Time.unscaledDeltaTime always works, ie. the iTween in Unity5 will always jump when selected DC changed in Frame Debugger.
In conclusion, if you have some logic in Update method, not accumulated with Time.scale, will make change when a frame passed even if the Editor is paused. I found the API UnityEditor.EditorApplication.isPaused works for me. Add this check in some key Update method, the Frame Debugger will be ok. Remember to add the #if UNITYEDITOR~
Hope this can make some help : )