public sealed class AnimationGraphCompilerTurns an authored animation graph into the state machine the runtime plays.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Every reference is resolved here and nowhere else. The document names states, parameters and joints by name and clips by GUID; the runtime wants indices, object references and a resolved AnimationClip. Doing that translation in one place is what lets the editor report "this transition goes to a state that is not here" as a line in a panel rather than as an exception from a constructor three layers down.
⚠ A clip that will not resolve is a diagnostic and an empty state, not a refusal. Authoring a graph before the clips are imported is the ordinary way round — the animator lays out idle, walk and run and the clips arrive later — and a compiler that refused would make the graph unopenable until every file existed. The state is built with a motion that plays nothing, so the topology is still checkable and the missing clip is named.
⚠ The resolver is an argument. What an AssetId means is the application's — an asset database, a test's dictionary, a build's artefact store — and a compiler that reached for one would be a compiler that could only run inside the editor.
Fields and properties (3)
public Func<AssetId, AnimationClip?>? ClipsWhere a clip comes from, or for a graph with none resolved.
public Skeleton? SkeletonThe skeleton a mask is resolved against, or for none.
public PoseScratch? ScratchWhere blends get their temporary poses, or for a fresh one.
Methods (2)
public AnimationGraphArtefact Compile(AnimationGraphAsset asset)Compiles a graph.
public static AnimationGraphArtefact Build(AnimationGraphAsset asset, Func<AssetId, AnimationClip?>? clips = null, Skeleton? skeleton = null)Compiles a graph, for a caller that wants one line rather than an object.
Used by (2)
- AnimationGraphDocumentVixen.Editor.AssetEditors
- AnimationGraphTestsVixen.Editor.AnimationGraph.Tests