Contents

init(definition:nodeResourceMapping:skeletonResource:)

Compiles an animation graph definition into a resource that can drive animation on an entity.

Declaration

convenience init(definition: Data, nodeResourceMapping: [Int : AnimationResource] = [:], skeletonResource: SkeletonResource) throws

Parameters

  • definition:

    The animation graph definition to compile.

  • nodeResourceMapping:

    A mapping from graph-node IDs to the Animationresource clips those nodes reference. Defaults to empty.

  • skeletonResource:

    The Skeletonresource the graph targets.

Discussion

To validate a definition without producing a resource — for example, when surfacing errors in editor tooling — call validate(definition:nodeResourceMapping:skeletonResource:) instead.

See Also

Creating an animation graph