Class UserPropertiesLoadingSample
Demonstrates how to load a 3D model using the built-in TriLib file picker and retrieve custom user properties embedded within the model. Displays the retrieved properties in the Unity UI.
Inherited Members
Namespace: TriLibCore.Samples
Assembly: Assembly-CSharp.dll
Syntax
public class UserPropertiesLoadingSample : MonoBehaviour
Methods
LoadModel()
Initiates a file-picker dialog for selecting a model to load, constructing custom TriLib AssetLoaderOptions if necessary, and registering event handlers for progress, errors, and completion.
Declaration
public void LoadModel()
Remarks
The file-picker interface will allow the user to select a model file at runtime. Once selected, TriLib begins loading and triggers corresponding events (OnBeginLoad(bool), OnProgress(AssetLoaderContext, float), TriLibCore.Samples.UserPropertiesLoadingSample.OnLoad(TriLibCore.AssetLoaderContext), TriLibCore.Samples.UserPropertiesLoadingSample.OnMaterialsLoad(TriLibCore.AssetLoaderContext), and TriLibCore.Samples.UserPropertiesLoadingSample.OnError(TriLibCore.IContextualizedError)).