Vixen
dd8b0a81
csharp
public static class AnimationSystems

The animation passes, as a set a game registers in one line.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ For as long as these systems existed, nobody made that call (#1221). The one caller of AddAnimation anywhere in the tree was GizmoTests, so none of the three passes below was in any game's loop — and because none of them carries [GameSystem], the generated registry did not add them either. [UpdateInGroup] orders a system that has already been added and does not add one. The consequence was wider than skinning: an AnimatorComponent in a shipping game was never evaluated, so clip playback and root motion were unreachable too. PhysicsSystems.AddPhysics, whose argument the paragraph below borrows, was called — by Sample 13 — and that asymmetry was the whole diagnosis. Two callers now: Arena.Register in Sample 13, beside its AddPhysics, and Vixen.Editor.App's PlayAnimation, so every in-editor play session evaluates a project's animators.

⚠ And [GameSystem] is deliberately not the alternative, which is the other half of what #1221 asked to be decided. GameSystemAttribute's own remarks make it opt-in and say the engine's own systems do not carry it: a declared system is one a project owns and is built out of a service registry, and these three take no service. Annotating them would put three engine passes into the declared set of every project that transitively links this assembly, decided here rather than by the host that is running the frame.

⚠ Three passes now, not two. BlendShapeAnimationSystem is the third and it needs no renderer — it writes a component the render side reads — so it is added unconditionally like the other two. A game with no morphed meshes walks a query that matches nothing.

The same shape PhysicsSystems.AddPhysics takes, and it was missing for as long as animation had systems. EngineLoop registers a default set and cannot include these: Vixen.Animation references Vixen.Engine, so the dependency only runs one way and the engine has no name for an animator. The result was that every game had to know the passes exist and what order they go in.

⚠ Both passes are added whether or not a game has skinned characters. Each costs one query that matches nothing, and the alternative — a second registration call somebody has to know to make — is a character that does not move for a reason nobody can see. That is the argument the physics registration already makes about its character pass.

Methods (3)

Used by (3)

  • ArenaThirdPersonShooter
  • GizmoTestsVixen.Animation.Tests
  • PlayAnimationVixen.Editor.App