Class ByNameAnimatorOverrideAnimationClipMapper
Implements an AnimatorOverrideAnimationClipMapper that maps animation clips by matching their names to those defined in an Animator Override Controller. This mapper uses a configurable string comparison mode and a case-insensitivity option to determine if a loaded animation clip matches a key in the override controller.
Inheritance
Inherited Members
Namespace: TriLibCore.Mappers
Assembly: Assembly-CSharp.dll
Syntax
[CreateAssetMenu(menuName = "TriLib/Mappers/Animation Clip/By Name Animator Override Animation Clip Mapper", fileName = "ByNameAnimatorOverrideAnimationClipMapper")]
public class ByNameAnimatorOverrideAnimationClipMapper : AnimatorOverrideAnimationClipMapper
Fields
CaseInsensitive
Gets or sets a value indicating whether the string comparison should be case insensitive.
Declaration
public bool CaseInsensitive
Field Value
Type | Description |
---|---|
bool |
StringComparisonMode
Specifies the string comparison mode for matching animation clip names against the keys in the Animator Override Controller.
Declaration
[Header("Left = Animator Override Clip Names, Right = Loaded Clip Names")]
public StringComparisonMode StringComparisonMode
Field Value
Type | Description |
---|---|
StringComparisonMode |
Remarks
This setting is used to compare the “left” side of the mapping (the names defined in the Animator Override Controller) to the “right” side (the names of the loaded animation clips).
Methods
MapArray(AssetLoaderContext, AnimationClip[])
Declaration
public override AnimationClip[] MapArray(AssetLoaderContext assetLoaderContext, AnimationClip[] sourceAnimationClips)
Parameters
Type | Name | Description |
---|---|---|
AssetLoaderContext | assetLoaderContext | |
AnimationClip[] | sourceAnimationClips |
Returns
Type | Description |
---|---|
AnimationClip[] |
Overrides
Remarks
This method retrieves the UnityEngine.Animator component from the root GameObject in the Asset Loader Context and assigns the specified AnimatorOverrideController to it. If either the animator or the override controller is missing, a warning is issued (if enabled in the options) and the original animation clips are returned unmodified.