Creating Animation Types
Animation systems are separated in two parts, the animation type and the animation system itself.
The animation type is an Abstract class that inherits from AnimationSystem with an AvatarReadyName attribute. Animation systems can then inherit from that class.
[AvatarReadyName("IK")]
public abstract class IKAnimationSystem : AnimationSystem
{
}
The animation type can be selected in the avatar ready inspector using the value defined in the AvatarReadyName attribute. All animation systems inheriting from that type will then be available in the avatar ready editor.
To create a new animation system, it must inherit from an animation type. The animation type must implement two functions from the Animation system.
public abstract class AnimationSystem
{
public abstract void Init(AvatarReady avatarReady);
public abstract void Reset(AvatarReady avatarReady);
}
Init is used to add the necessary components and setup starting values,
Reset should remove all added components and clear all modified values to make sure the avatar is ready for another animation system.
These functions can be called at runtime when the avatar is initialized or in editor mode when clicking the setup avatar button of a static avatar.
In most cases, an animation system should add a monobehaviour component to the avatar that will manage the animation of the avatar at runtime.