πŸ”ΈAnimation Asset

This section explains how to use Animation Assets.

Overview

An Animation Asset is a ScriptableObject that stores an Animation Clip and the properties that define how CAS plays it:

Animation Asset example.
  • Clip β€” the Animation Clip to play.

  • Mask β€” the bones affected by this animation.

  • Ease Mode β€” easing function for blend in/out.

  • Blend In/Out Time β€” seconds to blend in/out.

  • Play Rate β€” playback speed multiplier.

  • Is Additive β€” apply the animation additively.

  • Auto Blend Out β€” automatically blend out on completion.

  • Slot β€” where to play this animation in the layered blending.

circle-check

Animation Slots

Animation Slots define where a clip is applied in the animation graph. By default, there are three:

  • Default Overlay

  • Overlay

  • Full Body

Each slot applies at a different stage of the graph.

Slots.

Default Overlay

Use for general animations when you want to preserve Dynamic Bones.

circle-check

Overlay

Applied after Default Overlay. Use when the animation should affect Dynamic Bones.

circle-check

Full Body

Applied after blending; affects the whole character pose. Use for full-body animations (e.g., climbing).

Post Full Body

Applied after Full Body; plays on top of the final character pose.

circle-check

Use the Character Animation Component to play or stop an Animation Asset:

Custom Events

You can bind custom events to an animation asset by supplying an array of AnimationMixerEvent objects.

Example:

The AnimationMixerEvent struct has a very simple constructor.

The callback has the following signature.

  • animationAsset β€” The animation asset that triggers the event.

  • normalizedTime β€” The normalized playback time [0..1] when the event is triggered.

Last updated