processAndCreateAnimation(for:operations:name:)
Processes skeletal animation with the specified operations.
Declaration
func processAndCreateAnimation(for skeleton: SkeletonResource? = nil, operations: [SampledAnimation<Value>.SkeletalAnimationOperation], name: String = "") throws -> any AnimationDefinitionParameters
- skeleton:
The skeleton resource for the animation; required for all operations except Converttoadditive(baseanimation:) and Converttoadditiveusingfirstsample().
- operations:
Operations to perform on the animation. Must not be empty.
- name:
Name for the processed animation.
Return Value
An AnimationDefinition containing the processed animation. If root motion extraction is performed, returns an AnimationGroup containing both the skeletal animation (SampledAnimation<JointTransforms>) and extracted root motion (SampledAnimation<Transform>). Otherwise returns a SampledAnimation<JointTransforms>.
Discussion
Applies a series of skeletal animation processing operations to create a new animation. The function executes operations in the order specified. If skeleton is nil, only additive operations are supported.