TriLib
Search Results for

    Show / Hide Table of Contents

    Class BlendShapePlayerMapper

    A specialized BlendShapeMapper that creates and configures a BlendShapePlayer component for the specified GameObject. The BlendShapePlayerMapper assigns blend shape keys and sets up animation curve mapping for blend shapes based on their index.

    Inheritance
    object
    Object
    ScriptableObject
    BlendShapeMapper
    BlendShapePlayerMapper
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: TriLibCore.BlendShapePlayer
    Assembly: Assembly-CSharp.dll
    Syntax
    [CreateAssetMenu(menuName = "TriLib/Mappers/BlendShape/BlendShape Player Mapper", fileName = "BlendShapePlayerMapper")]
    public class BlendShapePlayerMapper : BlendShapeMapper

    Properties

    AnimationCurveSourceType

    Indicates the source type (e.g., SkinnedMeshRenderer or another component) for blend shape animation curves. Override to specify a different type if not using the default Unity setup.

    Declaration
    public override Type AnimationCurveSourceType { get; }
    Property Value
    Type Description
    Type
    Overrides
    BlendShapeMapper.AnimationCurveSourceType
    Remarks

    Returns the Type of the source component used for animation curve mapping, which is BlendShapePlayer.

    Methods

    MapAnimationCurve(AssetLoaderContext, int)

    Provides a way to remap the animation property name or path when creating animation curves for blend shape keys, effectively controlling how TriLib’s loaded blend shape animations are interpreted in Unity. Override this if your system requires a different naming scheme.

    Declaration
    public override string MapAnimationCurve(AssetLoaderContext assetLoaderContext, int blendShapeIndex)
    Parameters
    Type Name Description
    AssetLoaderContext assetLoaderContext

    References the model loading data, including loaded objects, user settings, and runtime information.

    int blendShapeIndex

    The index of the blend shape within the mesh. This value can be used to determine the naming or structure of animation curves.

    Returns
    Type Description
    string

    A new or adjusted string representing the animation curve property to which this blend shape should be keyed. null by default, indicating no remapping.

    Overrides
    BlendShapeMapper.MapAnimationCurve(AssetLoaderContext, int)
    Remarks

    Maps a blend shape key index to an animation curve property name by delegating the lookup to GetPropertyName(int).

    Setup(AssetLoaderContext, IGeometryGroup, GameObject, List<IBlendShapeKey>)

    Performs initial configuration for the specified geometryGroup, applying the blend shape data to the provided meshGameObject. Override this method to implement a custom blend shape playback system (e.g., a custom runtime script or different naming conventions).

    Declaration
    public override void Setup(AssetLoaderContext assetLoaderContext, IGeometryGroup geometryGroup, GameObject meshGameObject, List<IBlendShapeKey> blendShapeKeys)
    Parameters
    Type Name Description
    AssetLoaderContext assetLoaderContext

    The AssetLoaderContext containing references to loaded objects, loading options, and callbacks.

    IGeometryGroup geometryGroup

    The geometry group (mesh data and related structures) containing the blend shape keys.

    GameObject meshGameObject

    The UnityEngine.GameObject to which the blend shape mesh is bound. Often hosts a UnityEngine.SkinnedMeshRenderer if using Unity’s default system.

    List<IBlendShapeKey> blendShapeKeys

    A list of IBlendShapeKey objects referencing the blend shapes (morph targets) available for this mesh.

    Overrides
    BlendShapeMapper.Setup(AssetLoaderContext, IGeometryGroup, GameObject, List<IBlendShapeKey>)
    Remarks

    This method adds a BlendShapePlayer component to the provided meshGameObject, and calls its Setup(IGeometryGroup, List<IBlendShapeKey>) method to initialize it with the given geometryGroup and blendShapeKeys.

    Extension Methods

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