Class ExternalDataMapper
Serves as an abstract base class for locating and opening external data streams within the TriLib loading workflow. Inheritors must override Map(AssetLoaderContext, string, out string) to define how resource filenames are resolved into Stream objects, allowing for custom logic such as path transformations, caching, or network retrieval.
Inheritance
Namespace: TriLibCore.Mappers
Assembly: TriLibCore.dll
Syntax
public abstract class ExternalDataMapper : ScriptableObject
Constructors
ExternalDataMapper()
Declaration
protected ExternalDataMapper()
Methods
Map(AssetLoaderContext, string, out string)
Attempts to locate and open the data resource corresponding to
originalFilename
in the context of a TriLib model load.
Implementers can check the file system, network sources, or other data repositories
to resolve the file path.
Declaration
public abstract Stream Map(AssetLoaderContext assetLoaderContext, string originalFilename, out string finalPath)
Parameters
Type | Name | Description |
---|---|---|
AssetLoaderContext | assetLoaderContext | The AssetLoaderContext containing loading settings, callbacks, and references to the model’s assets and hierarchy. |
string | originalFilename | The name or partial path of the resource as referenced in the source file (e.g., a texture filename or other embedded data pointer). |
string | finalPath | Outputs the resolved, absolute path to the located resource.
Returns |
Returns
Type | Description |
---|---|
Stream | A Stream to the resource if located successfully; otherwise,
|