Hello!
I've been using a setup for a while where I use Mecanim as a basic state machine, but the state machine behaviours still talk to a controller script that accesses a skeleton animation.
One of the more frustrating things I've encountered is when I want to pop into a state that plays a non-looping animation, and I want it to exit the state once the animation is complete. Currently, I'm playing the track in OnStateEnter, getting the TrackEntry back, and then subscribing to the Complete event. Once it triggers, I set a property in the animator that allows me to be released back into another state. This has been working for the most part, but I've unfortunately had it get stuck before (it might have missed the event or the event didn't fire for some reason?)
Previously I was just checking if the TrackEntry was 'complete' during the OnStateUpdate, but occasionally I would get false positives or the track would get set to <none> and then never be 'complete'.
I was exploring using the Skeleton Animator because I really like that the animations become clips so the states can naturally exit once the clip is complete, but I was having some trouble with tracks. I have animations that utilize two separate tracks (moving legs while firing, etc) and didn't quite see how, using mecanim, I'd specify what track each clip would play on. Is there still a concept of Tracks with the Skeleton Animator? How do you use them?
Also, if using the Skeleton Animator ends up being too much of a refactor, do you have advice on the cleanest way for the Skeleton Animation to pop an animator out of its current state when a particular TrackEntry is complete?