Namespace TriLibCore
Classes
AssetDownloader
Provides functionality for downloading 3D model data from a specified URI and loading it into Unity. This class supports various HTTP methods (GET, POST, PUT, DELETE, HEAD) and offers optional asynchronous behavior. The downloaded model can be placed within a specified UnityEngine.GameObject hierarchy, and can handle .zip archives if requested.
AssetDownloaderBehaviour
Provides coroutines for asynchronously downloading model data from a remote source, then passing that data to TriLib’s AssetLoader or AssetLoaderZip for actual model loading. This component is spawned at runtime by LoadModelFromUri(UnityWebRequest, Action<AssetLoaderContext>, Action<AssetLoaderContext>, Action<AssetLoaderContext, float>, Action<IContextualizedError>, GameObject, AssetLoaderOptions, object, string, bool?, bool) and automatically destroyed once the download and loading processes finish.
AssetLoader
Provides static methods for loading 3D models and related assets into Unity. This class includes functionality for reading various file types or streams, creating mesh and material data, setting up animations, configuring LODs, and more.
AssetLoaderFilePicker
Extends IOAssetLoader to handle model file or directory selection using a platform-specific file picker. Once a user selects one or more files/folders, TriLib's loading pipeline is triggered to import the models (including materials, textures, etc.).
AssetLoaderZip
Provides methods to load 3D models from a .zip file or stream using TriLib. It wraps around the core AssetLoader methods, automatically unpacking the first suitable 3D model file found within the archive and configuring any external data mappers necessary for successful loading of textures, materials, and other resources.
Typical use involves calling one of the public methods (e.g., LoadModelFromZipFile(string, Action<AssetLoaderContext>, Action<AssetLoaderContext>, Action<AssetLoaderContext, float>, Action<IContextualizedError>, GameObject, AssetLoaderOptions, object, string, bool, Action<AssetLoaderContext>) or LoadModelFromZipStream(Stream, Action<AssetLoaderContext>, Action<AssetLoaderContext>, Action<AssetLoaderContext, float>, Action<IContextualizedError>, GameObject, AssetLoaderOptions, object, string, bool, string, Action<AssetLoaderContext>)) to load a zipped model either synchronously or asynchronously.
AssetUnloader
Manages the destruction and cleanup of TriLib-loaded assets (e.g., UnityEngine.Texture2D, UnityEngine.Material, UnityEngine.Mesh) associated with a particular UnityEngine.GameObject. This component records references to loaded assets in Allocations and destroys them when the UnityEngine.GameObject is destroyed.
CoroutineHelper
Provides a singleton UnityEngine.GameObject and UnityEngine.MonoBehaviour in the scene specifically for running coroutines. This helper is particularly useful for static classes or non-UnityEngine.MonoBehaviour objects that require coroutine-driven logic without needing to create their own UnityEngine.GameObject.
IOAssetLoader
Provides functionality for selecting and loading 3D models from file streams (including archives) and applying them to the Unity scene using TriLib’s AssetLoader pipeline. This class manages callbacks for model loading, progress reporting, and error handling, and it can optionally destroy itself after the loading process completes.
LipSyncMapping
Represents the Viseme to Blend-Shape Keys mapped indices. The indices are generated from the Lip Sync Mappers.
MultipleAssetLoaderZip
Provides methods to load every recognized model file within a .zip archive,
leveraging TriLib’s AssetLoader under the hood. Unlike AssetLoaderZip
,
this class attempts to load multiple models from the same .zip file rather than just the first.
Readers
Represents a series of methods to retrieve TriLib readers information.
RuntimeInitialization
TriLib initialization methods.
TriLibSettings
Represents the TriLib project settings provider. You can override this behavior to store the settings in other places.
UriLoadCustomContextData
Holds additional context data related to URI-based (network) model loading. Instances of this class are stored in an TriLibCore.AssetLoaderContext.CustomData object, allowing developers to track the originating UnityWebRequest and related networking state.
ZipLoadCustomContextData
Provides additional context data to the TriLibCore.AssetLoaderContext when loading models
from a .zip
archive. This includes references to the ZipFile,
its corresponding ZipEntry, the underlying Stream,
and optional callbacks for errors and material-loading events.
Enums
AssetDownloader.HttpRequestMethod
Represents the HTTP request methods supported by CreateWebRequest(string, HttpRequestMethod, string, int).