TriLib
Search Results for

    Show / Hide Table of Contents

    Class ByBonesRootBoneMapper

    Implements a root bone selection strategy by scanning a list of bones (Transform components) and choosing the one with the greatest number of child transforms. This mapper is useful when the asset hierarchy does not provide a clear root bone from naming conventions alone.

    Inheritance
    object
    Object
    ScriptableObject
    RootBoneMapper
    ByBonesRootBoneMapper
    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 Bones Root Bone Mapper", fileName = "ByBonesRootBoneMapper")]
    public class ByBonesRootBoneMapper : RootBoneMapper

    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