TriLib
Search Results for

    Show / Hide Table of Contents

    Class ByNameLipSyncMapper

    Provides a lip sync mapping strategy by searching for viseme matches in blend‐shape key names. This mapper searches through candidate names specified in VisemeCandidates and compares them with the names of blend‐shape keys found in the model's geometry. If a match is found (using the configured string comparison options), the corresponding blend‐shape key index is returned.

    Inheritance
    object
    Object
    ScriptableObject
    LipSyncMapper
    ByNameLipSyncMapper
    Inherited Members
    LipSyncMapper.CheckingOrder
    LipSyncMapper.VisemeCount
    LipSyncMapper.Map(AssetLoaderContext, IGeometryGroup, out int[])
    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.Mappers
    Assembly: Assembly-CSharp.dll
    Syntax
    [CreateAssetMenu(menuName = "TriLib/Mappers/LypSync/By Name Lip Sync Mapper", fileName = "ByNameLipSyncMapper")]
    public class ByNameLipSyncMapper : LipSyncMapper

    Fields

    CaseInsensitive

    Indicates whether string comparisons for mapping visemes should be case insensitive.

    Declaration
    public bool CaseInsensitive
    Field Value
    Type Description
    bool

    StringComparisonMode

    Defines the string comparison mode used when matching blend‐shape key names against viseme candidate names.

    Declaration
    [Header("Left = Blend-Shape Key Name, Right = Viseme Name")]
    public StringComparisonMode StringComparisonMode
    Field Value
    Type Description
    StringComparisonMode
    Remarks

    The "left" value in the comparison is the name of the blend‐shape key and the "right" value is the candidate name.

    VisemeCandidates

    A list of viseme candidates. Each VisemeCandidate defines a viseme and a collection of acceptable blend‐shape names that can be used to represent that viseme.

    Declaration
    public List<VisemeCandidate> VisemeCandidates
    Field Value
    Type Description
    List<VisemeCandidate>

    Methods

    MapViseme(AssetLoaderContext, LipSyncViseme, IGeometryGroup)

    Declaration
    protected override int MapViseme(AssetLoaderContext assetLoaderContext, LipSyncViseme viseme, IGeometryGroup geometryGroup)
    Parameters
    Type Name Description
    AssetLoaderContext assetLoaderContext

    The AssetLoaderContext containing the model loading data.

    LipSyncViseme viseme

    The viseme to map.

    IGeometryGroup geometryGroup

    The geometry group that contains the blend‐shape keys.

    Returns
    Type Description
    int

    The index of the blend‐shape key corresponding to the viseme if a match is found; otherwise, -1.

    Overrides
    LipSyncMapper.MapViseme(AssetLoaderContext, LipSyncViseme, IGeometryGroup)
    Remarks

    This method iterates over each VisemeCandidate that matches the provided viseme. For each candidate name, it compares the candidate string with the name of each blend‐shape key in the geometryGroup using Matches(StringComparisonMode, bool, string, string) with the specified StringComparisonMode and CaseInsensitive settings. If a match is found, the method returns the index of the matching blend‐shape key; otherwise, it returns -1.

    Extension Methods

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