Class UserPropertiesMapper
Provides a mechanism for handling custom properties embedded within 3D model data. By subclassing UserPropertiesMapper, developers can intercept and process user-defined attributes (e.g., metadata or extended properties) attached to a model’s nodes, materials, or other elements.
Namespace: TriLibCore.Mappers
Assembly: TriLibCore.dll
Syntax
public class UserPropertiesMapper : ScriptableObject
Constructors
UserPropertiesMapper()
Declaration
public UserPropertiesMapper()
Methods
OnProcessUserData(AssetLoaderContext, GameObject, string, object)
Invoked whenever a user-defined property (e.g., custom FBX attributes, metadata fields, etc.) is found on a node in the loaded model. Override this method to implement custom logic for storing, interpreting, or reacting to these properties in your Unity UnityEngine.GameObject hierarchy.
Declaration
public virtual void OnProcessUserData(AssetLoaderContext assetLoaderContext, GameObject gameObject, string propertyName, object propertyValue)
Parameters
Type | Name | Description |
---|---|---|
AssetLoaderContext | assetLoaderContext | The AssetLoaderContext containing references to loaded model objects, import settings, and other contextual data. |
GameObject | gameObject | The UnityEngine.GameObject to which the property belongs. |
string | propertyName | The name or identifier of the custom property (e.g., "collisionType", "lightmapIndex"). |
object | propertyValue | The value of the custom property. Its type can vary (e.g., string, float, arrays, or other complex data structures). |