You can implement your own state type by inheriting from AnimancerState
(or any type derived from it):
using Animancer;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Animations;
public class MyState : AnimancerState
{
private AnimationClip _Clip;
public override float Length => _Clip.length;
public MyState(AnimationClip clip)
{
_Clip = clip;
}
protected override void CreatePlayable(out Playable playable)
{
playable = AnimationClipPlayable.Create(Root.Graph, _Clip);
}
}