Add animation store for pre-made clips

aac.AnimationStore(folder) seeds a clip from an existing .anim asset and
returns a normal ClipBuilder, so pre-made clips work anywhere generated
clips do and can still be edited (looping, keyframes, toggles, blend
shapes). The Unity side clones the asset into the container and applies
the script's changes to the clone, leaving the original untouched.

- ClipData gains optional source; looping becomes Option<bool> so an
  untouched store clip keeps the asset's own looping setting.
- Add rust/examples/animation_store.rhai, a worked store example.
This commit is contained in:
2026-09-18 14:52:02 +01:00
parent 42a1234e7f
commit 2c3b670ab9
10 changed files with 377 additions and 17 deletions
+1
View File
@@ -89,6 +89,7 @@ pub fn engine(aac: Aac) -> Engine {
engine.register_type_with_name::<StateRef>("State");
engine.register_type_with_name::<TransitionRef>("Transition");
engine.register_type_with_name::<ClipBuilder>("Clip");
engine.register_type_with_name::<AnimationStore>("AnimationStore");
engine.register_type_with_name::<BlendTreeBuilder>("BlendTree");
register_conditions(&mut engine);