TriLib
Search Results for

    Show / Hide Table of Contents

    Class SampleUserPropertiesMapper

    A custom UserPropertiesMapper that forwards user properties (attached to model GameObjects) to a user-specified callback.

    Inheritance
    object
    Object
    ScriptableObject
    UserPropertiesMapper
    SampleUserPropertiesMapper
    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.Samples
    Assembly: Assembly-CSharp.dll
    Syntax
    public class SampleUserPropertiesMapper : UserPropertiesMapper

    Fields

    OnUserDataProcessed

    A callback invoked for each user property discovered during model loading.

    Declaration
    public Action<GameObject, string, object> OnUserDataProcessed
    Field Value
    Type Description
    Action<GameObject, string, object>
    Remarks

    This Action<T1, T2, T3> receives the following parameters:

    • GameObject: The GameObject to which the user property is attached.
    • string: The property’s name.
    • object: The property’s value (may be various types, such as float, int, string, etc.).

    Methods

    OnProcessUserData(AssetLoaderContext, GameObject, string, object)

    Overrides the default TriLib user property processing to invoke the OnUserDataProcessed callback (if not null).

    Declaration
    public override void OnProcessUserData(AssetLoaderContext assetLoaderContext, GameObject gameObject, string propertyName, object propertyValue)
    Parameters
    Type Name Description
    AssetLoaderContext assetLoaderContext

    Contains context about the current model loading process.

    GameObject gameObject

    The UnityEngine.GameObject that owns the current user property.

    string propertyName

    The name of the user property.

    object propertyValue

    The value of the user property, potentially in various types.

    Overrides
    UserPropertiesMapper.OnProcessUserData(AssetLoaderContext, GameObject, string, object)

    Extension Methods

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