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.
AssetLoaderContext
Serves as the central context for managing a model loading operation in TriLib. This class stores references to the loaded objects (GameObjects, textures, materials), user options, callbacks, and intermediate state (e.g., asynchronous tasks, in-flight texture loads).
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.).
AssetLoaderOptions
Represents a series of Model loading settings, like Unity Model Importer settings.
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.
MaterialMapperContext
Acts as a container for data used when converting a TriLib IMaterial into a Unity Material. This includes both the original material information, an intermediate VirtualMaterial representation, and the final Unity material reference, all of which are coordinated by a corresponding MaterialMapper.
MaterialRendererContext
Holds contextual information for assigning a TriLib-supplied IMaterial to a specific Unity Renderer at a particular sub-mesh index. This class also references the corresponding MaterialMapperContext and the broader AssetLoaderContext to unify data during material application.
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.
ReaderBase
Represents the base class used in all file-format Readers.
Readers
Represents a series of methods to retrieve TriLib readers information.
RuntimeInitialization
TriLib initialization methods.
TextureDataContext
Contains data and state information for loading and processing a texture during a TriLib model import. This context stores both the original source texture data and the resulting Unity texture, along with relevant metadata.
TextureLoadingContext
Contains data and state information for loading and processing a texture as part of TriLib's model import pipeline. This context holds both the source texture data (via TextureDataContext) and metadata (dimensions, component count, raw data) used to create a Unity Texture.
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 CustomData object, allowing developers to track the originating UnityWebRequest and related networking state.
ZipLoadCustomContextData
Provides additional context data to the 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.
Structs
ModelNamingData
Represents a few information from a given Model, used to do Game Objects custom naming.
ReaderBase.ProfileContext
Interfaces
IContextualizedError
Represents an Exception with a Context.
Enums
AssetDownloader.HttpRequestMethod
Represents the HTTP request methods supported by CreateWebRequest(string, HttpRequestMethod, string, int).
FileBufferingMode
ReaderBase.PostLoadingSteps
Represents the post-processing steps enumeration.