Class SampleUserPropertiesMapper
A custom UserPropertiesMapper that forwards user properties (attached to model GameObjects) to a user-specified callback.
Inherited Members
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetInstanceID()
Object.GetHashCode()
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectOfType<T>()
Object.ToString()
Object.name
Object.hideFlags
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:
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. |