TriLib
Search Results for

    Show / Hide Table of Contents

    Class ByNameRootBoneMapper

    Implements a root bone selection strategy by searching for a matching bone name within the loaded model’s hierarchy. This mapper iterates over a predefined list of candidate root bone names (e.g., "Hips", "Bip01", "Pelvis") and returns the first match found based on the configured string comparison settings.

    Inheritance
    object
    Object
    ScriptableObject
    RootBoneMapper
    ByNameRootBoneMapper
    Inherited Members
    RootBoneMapper.Map(AssetLoaderContext)
    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/Root Bone/By Name Root Bone Mapper", fileName = "ByNameRootBoneMapper")]
    public class ByNameRootBoneMapper : RootBoneMapper

    Fields

    CaseInsensitive

    Indicates whether the string comparisons for matching root bone names should be case insensitive.

    Declaration
    public bool CaseInsensitive
    Field Value
    Type Description
    bool

    RootBoneNames

    A list of candidate root bone names to search for in the loaded model. Examples might include "Hips", "Bip01", and "Pelvis".

    Declaration
    public string[] RootBoneNames
    Field Value
    Type Description
    string[]

    StringComparisonMode

    Specifies the string comparison mode for matching loaded GameObject names against the candidate root bone names.

    Declaration
    [Header("Left = Loaded GameObjects Names, Right = Names in RootBoneNames")]
    public StringComparisonMode StringComparisonMode
    Field Value
    Type Description
    StringComparisonMode
    Remarks

    The "left" value is the name of the loaded GameObject and the "right" value is one of the candidate names specified in RootBoneNames.

    Methods

    Map(AssetLoaderContext, IList<Transform>)

    Finds a suitable root bone from a provided list of potential bone transforms. This is the highest-level bone in the hierarchy that others descend from. Subclasses should override this method to implement more advanced selection logic (e.g., checking naming patterns, evaluating bone connections, etc.).

    Declaration
    public override Transform Map(AssetLoaderContext assetLoaderContext, IList<Transform> bones)
    Parameters
    Type Name Description
    AssetLoaderContext assetLoaderContext

    The AssetLoaderContext referencing the loaded model’s GameObjects, user-defined import options, and callbacks.

    IList<Transform> bones

    An ordered or unordered list of transforms that may qualify as bones in the skeleton hierarchy. Subclasses can evaluate these to decide which one is truly at the top of the chain.

    Returns
    Type Description
    Transform

    The UnityEngine.Transform chosen to serve as the root bone. By default, this method returns assetLoaderContext.RootGameObject.transform.

    Overrides
    RootBoneMapper.Map(AssetLoaderContext, IList<Transform>)

    Extension Methods

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