docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IAnimationProcessor

    Interface for processing animation clips. The animation clip/curve data may be processed towards a specific animation system.

    Inherited Members
    IDisposable.Dispose()
    Namespace: GLTFast.Animations
    Assembly: glTFast.dll
    Syntax
    public interface IAnimationProcessor : IDisposable
    Remarks

    A processor instance is created by an IAnimationProcessorFactory for a single import call (the conversion phase). Its lifetime ends when the conversion phase ends and Dispose() is invoked. Dispose() is the place to release scratch buffers and other temporary resources.

    Methods

    AddClip(int, string)

    Initialize a new animation clip with the given name and index. Is called before any animation curves are added to the clip.

    Declaration
    void AddClip(int index, string name)
    Parameters
    Type Name Description
    int index

    glTF animation clip index.

    string name

    glTF animation clip name.

    AddMorphTargetWeightCurves(int, int, int, string, INodeHierarchyInfo, ReadOnly, ReadOnly, InterpolationType, string[])

    Adds a morph target weight curve to an animation clip.

    Declaration
    void AddMorphTargetWeightCurves(int clipIndex, int targetNode, int meshNumeration, string meshName, INodeHierarchyInfo nodeHierarchyInfo, NativeArray<float>.ReadOnly times, NativeArray<float>.ReadOnly values, InterpolationType interpolationType, string[] morphTargetNames = null)
    Parameters
    Type Name Description
    int clipIndex

    glTF animation clip index.

    int targetNode

    glTF index of the targeted node.

    int meshNumeration

    Target mesh number. A glTF mesh is converted into one or more MeshResult which are numbered consecutively. AddMesh(uint, string, MeshResult, uint[], uint?, float[], int) is called once for each of those MeshResults and the meshNumeration matches.

    string meshName

    Name of the targeted Unity mesh.

    INodeHierarchyInfo nodeHierarchyInfo

    Can be used to query hierarchical information and build an animation path string.

    NativeArray<float>.ReadOnly times

    Time values.

    NativeArray<float>.ReadOnly values

    Output morph target weight values.

    InterpolationType interpolationType

    Interpolation type.

    string[] morphTargetNames

    Morph targets' names.

    AddRotationCurves(int, int, INodeHierarchyInfo, ReadOnly, ReadOnly, InterpolationType)

    Adds a rotation curve to an animation clip.

    Declaration
    void AddRotationCurves(int clipIndex, int targetNode, INodeHierarchyInfo nodeHierarchyInfo, NativeArray<float>.ReadOnly times, NativeArray<quaternion>.ReadOnly values, InterpolationType interpolationType)
    Parameters
    Type Name Description
    int clipIndex

    glTF animation clip index.

    int targetNode

    glTF index of the targeted node.

    INodeHierarchyInfo nodeHierarchyInfo

    Can be used to query hierarchical information and build an animation path string.

    NativeArray<float>.ReadOnly times

    Time values.

    NativeArray<quaternion>.ReadOnly values

    Output rotation values.

    InterpolationType interpolationType

    Interpolation type.

    AddScaleCurves(int, int, INodeHierarchyInfo, ReadOnly, ReadOnly, InterpolationType)

    Adds a local scale curve to an animation clip.

    Declaration
    void AddScaleCurves(int clipIndex, int targetNode, INodeHierarchyInfo nodeHierarchyInfo, NativeArray<float>.ReadOnly times, NativeArray<float3>.ReadOnly values, InterpolationType interpolationType)
    Parameters
    Type Name Description
    int clipIndex

    glTF animation clip index.

    int targetNode

    glTF index of the targeted node.

    INodeHierarchyInfo nodeHierarchyInfo

    Can be used to query hierarchical information and build an animation path string.

    NativeArray<float>.ReadOnly times

    Time values.

    NativeArray<float3>.ReadOnly values

    Output scale values.

    InterpolationType interpolationType

    Interpolation type.

    AddTranslationCurves(int, int, INodeHierarchyInfo, ReadOnly, ReadOnly, InterpolationType)

    Adds a translation curve to an animation clip.

    Declaration
    void AddTranslationCurves(int clipIndex, int targetNode, INodeHierarchyInfo nodeHierarchyInfo, NativeArray<float>.ReadOnly times, NativeArray<float3>.ReadOnly values, InterpolationType interpolationType)
    Parameters
    Type Name Description
    int clipIndex

    glTF animation clip index.

    int targetNode

    glTF index of the targeted node.

    INodeHierarchyInfo nodeHierarchyInfo

    Can be used to query hierarchical information and build an animation path string.

    NativeArray<float>.ReadOnly times

    Time values.

    NativeArray<float3>.ReadOnly values

    Output translation values.

    InterpolationType interpolationType

    Interpolation type.

    Complete()

    Signals that the conversion phase has finished and all animation curves have been added. Implementations may finalize their internal state and optionally return a factory that produces appliers to attach the processed animation data to instantiated scenes.

    Declaration
    IDataInstanceApplierFactory Complete()
    Returns
    Type Description
    IDataInstanceApplierFactory

    An IDataInstanceApplierFactory that creates instance appliers for the processed animation data, or null if no per-instance application is required.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)