@Mecanim-Dev
I’m wondering if it would be much trouble for the team to expose the time/progress value of a Transition in Unity 5.6.
We are attempting an art-directed animation system that involves some direct control over the progress of animations. We can do this easily for each state in Mecanim just fine by using animator.Play(), but when it comes to Transitions, we are in a bit of a bind. We use animator.CrossFade() to setup dynamic Transitions, but these are out-of-control animations in regards to the player for the duration of the Transition, since we cannot directly set the progress of the Transition in relation to player control.
This capability exists in a way with animation.Blend(), but if we go that route, we can’t really use the great features of Mecanim that we need, such as layer Syncing and blending. I attempted to control it with Reflection, but apparently the CrossFade() method is extern so there’s no way that I know of to discern the reflection route to gain control.
I would think it shouldn’t be much issue to just expose this as a Property in AnimationTransitionInfo, so it can be set directly, and perhaps a Bool to disable the automatic progression of the transition. At least I hope!
Thanks for the quick response! That’s a shame, I hope it does get implemented!
I had noticed the Playable system when I was digging through the API, but can it also handle layer syncing and additive capability that Mecanim offers?
I found a few references for constructing some Playables animation control, but it appears the system was changed up quite a bit in 5.6 so the tutorials don’t apply much. There is no more AnimationClipPlayable.Create() for example. I’ve dug through the code a bit with using ILSpy and trying to figure it out, have to make a PlayableGraph and then use extension methods that run off it to create different kinds of Playables. And I’m guessing you have to use them with Connect() in some way, but I’m failing to figure it out since it doesn’t seem to be letting me connect an AnimationClip Playable to an AnimatorController Playable, nor figure out how to make the graph not have zero outputs that it keeps warning about. I’d trying both PlayableGraph.Create() and AnimationPlayableUtilities.PlayAnimatorController() for making the graph, but no dice.
I’m currently working on exposing AnimationLayerMixerPlayable which support masking and override/additive layer but this is for the next version.
Unfortunately it won’t support syncing since this a Statemachine feature, but our goal is to open the animation system, which will allow you to evaluate statemachine without a controller eventually and like mecnaim is doing internally you will be able to build your own playable graph based on the statemachine output.