I've created a custom class with a bit more configuration for an animation
public class DetailedTransition : ClipTransition, ITransitionDetailed, IPolymorphic
{
[SerializeField] private float _playbackWeight;
[SerializeField] private bool _applyRootMotion;
public override void Apply(AnimancerState state)
{
base.Apply(state);
state.Root.Component.Animator.applyRootMotion = _applyRootMotion;
// if the layer weight is 0, fade in to target weight
if (state.Layer.Weight == 0)
{
state.Layer.StartFade(_playbackWeight, FadeDuration);
}
}
}
And a container for them
[Serializable] public class AnimationConfiguration
{
[SerializeReference] List<ITransitionDetailed> _clips;
public ReadOnlyCollection<ITransitionDetailed> Clips { get { return _clips.AsReadOnly(); } }
}
However the inspector doesn't show my class as an option in the dropdown, what do I need to do to get it registered?
I've created a custom class with a bit more configuration for an animation
And a container for them
However the inspector doesn't show my class as an option in the dropdown, what do I need to do to get it registered?
Cheers.