Namespace TriLibCore.Samples
Classes
AbstractInputSystem
Represents a base class to abstract input system actions.
This class automatically detects whether the old input system (UnityEngine.Input)
or the new input system (UnityEngine.InputSystem) is available, and delegates
input calls accordingly.
AssetViewer
A TriLib sample that allows the user to load models and HDR skyboxes from the local file-system and URLs. The loaded model can be manipulated (rotated, zoomed) within the scene, and the user can toggle various debug and rendering options.
AutodeskInteractiveMaterialsSample
Demonstrates how to load a 3D model using an OS file picker and apply a custom material mapping for Autodesk Interactive materials. This sample creates the AssetLoaderOptions if necessary, configures them using AutodeskInteractiveMaterialsHelper, and then launches the file picker via AssetLoaderFilePicker.
AvatarController
Manages avatar movement and camera positioning in TriLib samples. This class extends AbstractInputSystem to handle user input, allowing the character to move and rotate smoothly, as well as updating the camera’s position and orientation relative to the avatar.
AvatarLoader
Demonstrates how to load and control a custom humanoid avatar using TriLib. This class extends AbstractInputSystem to handle user input, integrate TriLib’s file-loading and network-loading features, and manage avatar loading and scaling in conjunction with AvatarController.
ExternalDataMapperSample
Represents a class that finds external resources at the given model base path.
FixMaterials
Configures sample materials depending on the rendering pipeline.
GltfMaterialsSample
Demonstrates how to load a 3D model using an OS file picker and apply a custom material mapping for glTF2 materials. This sample creates the AssetLoaderOptions if necessary, configures them using GltfMaterialsHelper, and then launches the file picker via AssetLoaderFilePicker.
ListModelResourcesSample
Demonstrates how to use TriLib to load a 3D model and list its associated resources (model path, textures, and external data). This sample allows the user to select a model via a file-picker and displays the loaded resources in a UI text component.
LoadExtraAnimationsSample
Demonstrates how to load a base 3D model, then load and merge extra animation clips from multiple animation-only models in the same folder. After loading, this sample dynamically creates UI buttons that allow you to play the newly added animations on the base model.
LoadModelFromFilePickerSample
Demonstrates how to load a 3D model via a file-picker at runtime using TriLibCore.General.AssetLoaderFilePicker. This sample displays a UI button to open the picker, and updates a progress label while the model is being loaded.
LoadModelFromFileSample
Provides a sample showing how to load the TriLibSample.obj
model
from a specific local path at runtime or in the Unity Editor.
This example demonstrates basic usage of TriLibCore.General.AssetLoader
for loading 3D assets from a file.
LoadModelFromStreamSample
Demonstrates how to load a 3D model from a file Stream using TriLib,
while applying custom mapper scripts (ExternalDataMapperSample and TextureMapperSample)
to locate external resources (e.g. textures, materials).
This sample loads the TriLibSample.obj
model from the Models
folder
and uses the specified mappers to handle external dependencies.
LoadModelFromURLSample
Demonstrates how to load a compressed (zipped) 3D model from a remote URL using TriLib. This class creates and configures loader options, downloads the model asynchronously, and reports progress or errors through callbacks.
PasteManager
Provides paste functionality to WebGL builds via a singleton manager. This class automatically sets itself up in WebGL to handle text paste events, allowing them to be inserted into Unity's UnityEngine.UI.InputField components.
RuntimeProcessUtils
SampleUserPropertiesMapper
A custom UserPropertiesMapper that forwards user properties (attached to model GameObjects) to a user-specified callback.
ShowSkeleton
Displays the skeletal hierarchy of a loaded model by drawing lines between each bone (transform).
SimpleCustomAssetLoader
Provides static methods for loading 3D models from byte arrays or Stream objects. This class integrates custom data and texture mappers via user-supplied callbacks, enabling flexible loading scenarios such as in-memory data, custom file paths, or network streams.
SimpleCustomLoaderSample
Demonstrates how to load an OBJ model (with a single texture) entirely from string-encoded data. This class uses SimpleCustomAssetLoader to parse model geometry, material (.mtl) files, and texture images stored as string constants.
SimpleExternalDataMapper
A custom ExternalDataMapper implementation that uses user-supplied callbacks to handle external data loading. This is useful when the model references additional files (e.g., textures, external geometry, etc.) and you want fine-grained control over how and where those files are retrieved.
SimpleTextureMapper
A custom TextureMapper implementation that uses a user-supplied callback to retrieve texture data. This mapper allows you to control how texture streams are opened, enabling scenarios such as loading from memory or over the network.
TextureMapperSample
Represents a class that finds textures at the given model base path.
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.