Add debug mode to Animator Monitor to prevent infinite loop

Haytam95

Active member
Hi

I'm working with animations (Maybe experimenting is a better way to call it) and I've been having a lot of problems with infinite loops when I setup wrongly the transitions. Having to close and re open the project:

1625232716842.png


Debuging a little I found out that the infinite loop can happen here, if the animator transition isn't properly set:

1625232793140.png

So I would like to suggest to add a debug mode in the Animator Monitor with a transition timeout limit.

If that limit is reached and the code is stuck in the While, break out the while somehow (Killing the component, destroying the animator or anything) and leave a console log with the transition that failed.

Currently, the editor just stucks forever

Thanks!
 
Hi

I'm working with animations (Maybe experimenting is a better way to call it) and I've been having a lot of problems with infinite loops when I setup wrongly the transitions. Having to close and re open the project:

View attachment 6370


Debuging a little I found out that the infinite loop can happen here, if the animator transition isn't properly set:

View attachment 6371

So I would like to suggest to add a debug mode in the Animator Monitor with a transition timeout limit.

If that limit is reached and the code is stuck in the While, break out the while somehow (Killing the component, destroying the animator or anything) and leave a console log with the transition that failed.

Currently, the editor just stucks forever

Thanks!

You could try putting your own code in there to break the loop with key press or combination of keys.
 
You could try putting your own code in there to break the loop with key press or combination of keys.

Yes, you're right @zroc (And I actually did it) it works with a timer as I've described.

But then when a new version come out, my changes would be overriden so my suggestion was to add something like that as default, thinking that maybe other people could cross the same problem (Not so easy to find out if not coder and makes unity freeze) :)
 
Top