Class SimpleAnimationPlayerAnimationClipMapper
Implements an AnimationClipMapper that creates a SimpleAnimationPlayer for playing animation clips by index or name. When the animation type is set to Generic or Humanoid, and at least one animation clip is available, this mapper adds a SimpleAnimationPlayer to the model's root GameObject and assigns the animation clips to it.
Inheritance
Inherited Members
Namespace: TriLibCore.Mappers
Assembly: Assembly-CSharp.dll
Syntax
[CreateAssetMenu(menuName = "TriLib/Mappers/Animation Clip/Simple Animation Player Animation Clip Mapper", fileName = "SimpleAnimationPlayerAnimationClipMapper")]
public class SimpleAnimationPlayerAnimationClipMapper : AnimationClipMapper
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 override 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. |