Tanoda
TriLibCore.Samples.SimpleCustomAssetLoader Class Reference

Represents a class used to load models from Byte Arrays using callbacks to map External Data and Textures. More...

Static Public Member Functions

static AssetLoaderContext LoadModelFromByteData (byte[] data, string modelExtension, Action< IContextualizedError > onError, Action< AssetLoaderContext, float > onProgress, Action< AssetLoaderContext > onModelFullyLoad, Func< string, Stream > customDataReceivingCallback, Func< string, string > customFilenameReceivingCallback, Func< ITexture, Stream > customTextureReceivingCallback, string modelFilename=null, GameObject wrapperGameObject=null, AssetLoaderOptions assetLoaderOptions=null, object customData=null)
 Loads a model from the given Byte Array data using the given callbacks to handle events/external data. More...
 
static AssetLoaderContext LoadModelFromStream (Stream stream, string modelExtension, Action< IContextualizedError > onError, Action< AssetLoaderContext, float > onProgress, Action< AssetLoaderContext > onModelFullyLoad, Func< string, Stream > customDataReceivingCallback, Func< string, string > customFilenameReceivingCallback, Func< ITexture, Stream > customTextureReceivingCallback, string modelFilename=null, GameObject wrapperGameObject=null, AssetLoaderOptions assetLoaderOptions=null, object customData=null)
 Loads a model from the given Byte Array data using the given callbacks to handle events/external data. More...
 

Detailed Description

Represents a class used to load models from Byte Arrays using callbacks to map External Data and Textures.

Definition at line 62 of file SimpleCustomAssetLoader.cs.

Member Function Documentation

◆ LoadModelFromByteData()

static AssetLoaderContext TriLibCore.Samples.SimpleCustomAssetLoader.LoadModelFromByteData ( byte[]  data,
string  modelExtension,
Action< IContextualizedError >  onError,
Action< AssetLoaderContext, float >  onProgress,
Action< AssetLoaderContext >  onModelFullyLoad,
Func< string, Stream >  customDataReceivingCallback,
Func< string, string >  customFilenameReceivingCallback,
Func< ITexture, Stream >  customTextureReceivingCallback,
string  modelFilename = null,
GameObject  wrapperGameObject = null,
AssetLoaderOptions  assetLoaderOptions = null,
object  customData = null 
)
static

Loads a model from the given Byte Array data using the given callbacks to handle events/external data.

Parameters
dataThe model data Byte Array.
modelExtensionThe model file extension.
onErrorThe error event callback (optional).
onProgressThe loading progress event callback.
onModelFullyLoadThe model loading event callback.
customDataReceivingCallbackThe event that returns a Stream to read the external data passed to it.
customFilenameReceivingCallbackThe event that returns a file-system complete filename from the filename passed to it (optional).
customTextureReceivingCallbackThe event that returns a Stream to read Texture data from the filename passed to it.
modelFilenameThe model filename (optional).
wrapperGameObjectThe GameObject to wrap the loaded model (optional).
assetLoaderOptionsThe AssetLoaderOptions to use when loading the model (optional).
customDataAny custom data to pass to the loading method, which can be retrieved later (optional).
Returns
The AssetLoaderContext containing all common data regarding the model loading.

Definition at line 86 of file SimpleCustomAssetLoader.cs.

◆ LoadModelFromStream()

static AssetLoaderContext TriLibCore.Samples.SimpleCustomAssetLoader.LoadModelFromStream ( Stream  stream,
string  modelExtension,
Action< IContextualizedError >  onError,
Action< AssetLoaderContext, float >  onProgress,
Action< AssetLoaderContext >  onModelFullyLoad,
Func< string, Stream >  customDataReceivingCallback,
Func< string, string >  customFilenameReceivingCallback,
Func< ITexture, Stream >  customTextureReceivingCallback,
string  modelFilename = null,
GameObject  wrapperGameObject = null,
AssetLoaderOptions  assetLoaderOptions = null,
object  customData = null 
)
static

Loads a model from the given Byte Array data using the given callbacks to handle events/external data.

Parameters
streamThe model data Stream.
modelExtensionThe model file extension.
onErrorThe error event callback (optional).
onProgressThe loading progress event callback.
onModelFullyLoadThe model loading event callback.
customDataReceivingCallbackThe event that returns a Stream to read the external data passed to it.
customFilenameReceivingCallbackThe event that returns a file-system complete filename from the filename passed to it (optional).
customTextureReceivingCallbackThe event that returns a Stream to read Texture data from the filename passed to it.
modelFilenameThe model filename (optional).
wrapperGameObjectThe GameObject to wrap the loaded model (optional).
assetLoaderOptionsThe AssetLoaderOptions to use when loading the model (optional).
customDataAny custom data to pass to the loading method, which can be retrieved later (optional).
Returns
The AssetLoaderContext containing all common data regarding the model loading.

Definition at line 128 of file SimpleCustomAssetLoader.cs.


The documentation for this class was generated from the following file: