TriLib
Search Results for

    Show / Hide Table of Contents

    Class AnimationClipMapper

    Provides a mechanism for post-processing or re-mapping UnityEngine.AnimationClip instances within the TriLib loading pipeline. Subclasses can override MapArray(AssetLoaderContext, AnimationClip[]) to manipulate or customize animation data (e.g., for retargeting, curve simplification, or special playback requirements).

    Inheritance
    object
    AnimationClipMapper
    AnimatorOverrideAnimationClipMapper
    SimpleAnimationPlayerAnimationClipMapper
    Namespace: TriLibCore.Mappers
    Assembly: TriLibCore.dll
    Syntax
    public class AnimationClipMapper : ScriptableObject

    Constructors

    AnimationClipMapper()

    Declaration
    public AnimationClipMapper()

    Fields

    CheckingOrder

    Indicates the relative priority of this mapper when multiple AnimationClipMapper instances are defined in AnimationClipMappers. Lower values signify earlier processing, while higher values are tried later if earlier mappers do not produce a final result.

    Declaration
    public int CheckingOrder
    Field Value
    Type Description
    int

    Methods

    MapArray(AssetLoaderContext, AnimationClip[])

    Invoked to process an array of UnityEngine.AnimationClips, allowing for modifications such as re-structuring clip data, applying custom import settings, or removing unwanted frames.

    By default, this method returns the original sourceAnimationClips unmodified. Inherit from AnimationClipMapper to perform custom logic (e.g., applying curve simplification, retargeting bone names, etc.).

    Declaration
    public virtual AnimationClip[] MapArray(AssetLoaderContext assetLoaderContext, AnimationClip[] sourceAnimationClips)
    Parameters
    Type Name Description
    AssetLoaderContext assetLoaderContext

    The AssetLoaderContext encapsulating model loading state and references, including loaded objects, settings, and callbacks.

    AnimationClip[] sourceAnimationClips

    The unprocessed array of UnityEngine.AnimationClip instances.

    Returns
    Type Description
    AnimationClip[]

    An array of UnityEngine.AnimationClip after processing. Could be the same array, a modified version, or a newly created set of clips.

    Extension Methods

    IObjectExtensions.TryToDispose<T>(object)
    In this article
    Back to top Generated by DocFX