TriLib 2.2.8
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
TriLibCore.MultipleAssetLoaderZip Class Reference

Represents a class used to load all the models inside a Zip file. More...

Static Public Member Functions

static void LoadAllModelsFromZipStream (Stream stream, Action< AssetLoaderContext > onLoad, Action< AssetLoaderContext > onMaterialsLoad, Action< AssetLoaderContext, float > onProgress, Action< IContextualizedError > onError=null, GameObject wrapperGameObject=null, AssetLoaderOptions assetLoaderOptions=null, object customContextData=null, string fileExtension=null, bool haltTask=false, Action< AssetLoaderContext > onPreLoad=null)
 Loads all models from the given Zip file Stream asynchronously.
 
static void LoadAllModelsFromZipFile (string path, Action< AssetLoaderContext > onLoad, Action< AssetLoaderContext > onMaterialsLoad, Action< AssetLoaderContext, float > onProgress, Action< IContextualizedError > onError=null, GameObject wrapperGameObject=null, AssetLoaderOptions assetLoaderOptions=null, object customContextData=null, string fileExtension=null, bool haltTask=false, Action< AssetLoaderContext > onPreLoad=null)
 Loads all models from the given Zip file path asynchronously.
 

Detailed Description

Represents a class used to load all the models inside a Zip file.

Member Function Documentation

◆ LoadAllModelsFromZipFile()

static void TriLibCore.MultipleAssetLoaderZip.LoadAllModelsFromZipFile ( string  path,
Action< AssetLoaderContext onLoad,
Action< AssetLoaderContext onMaterialsLoad,
Action< AssetLoaderContext, float >  onProgress,
Action< IContextualizedError onError = null,
GameObject  wrapperGameObject = null,
AssetLoaderOptions  assetLoaderOptions = null,
object  customContextData = null,
string  fileExtension = null,
bool  haltTask = false,
Action< AssetLoaderContext onPreLoad = null 
)
static

Loads all models from the given Zip file path asynchronously.

Parameters
pathThe Zip file path.
onLoadThe Method to call on the Main Thread when any Model is loaded but resources may still pending.
onMaterialsLoadThe Method to call on the Main Thread when any Model and resources are loaded.
onProgressThe Method to call when any Model loading progress changes.
onErrorThe Method to call on the Main Thread when any error occurs.
wrapperGameObjectThe Game Object that will be the parent of the loaded Game Objects. Can be null.
assetLoaderOptionsThe options to use when loading the Models.
customContextDataThe Custom Data that will be passed along the Context.
fileExtensionThe Models inside the Zip file extension. If null TriLib will try to find a suitable model format inside the Zip file.
haltTaskTurn on this field to avoid loading the models immediately and chain the Tasks.
onPreLoadThe method to call on the parallel Thread before the Unity objects are created.

◆ LoadAllModelsFromZipStream()

static void TriLibCore.MultipleAssetLoaderZip.LoadAllModelsFromZipStream ( Stream  stream,
Action< AssetLoaderContext onLoad,
Action< AssetLoaderContext onMaterialsLoad,
Action< AssetLoaderContext, float >  onProgress,
Action< IContextualizedError onError = null,
GameObject  wrapperGameObject = null,
AssetLoaderOptions  assetLoaderOptions = null,
object  customContextData = null,
string  fileExtension = null,
bool  haltTask = false,
Action< AssetLoaderContext onPreLoad = null 
)
static

Loads all models from the given Zip file Stream asynchronously.

Parameters
streamThe Zip file Stream.
onLoadThe Method to call on the Main Thread when any Model is loaded but resources may still pending.
onMaterialsLoadThe Method to call on the Main Thread when any Model and resources are loaded.
onProgressThe Method to call when any Model loading progress changes.
onErrorThe Method to call on the Main Thread when any error occurs.
wrapperGameObjectThe Game Object that will be the parent of the loaded Game Objects. Can be null.
assetLoaderOptionsThe options to use when loading the Models.
customContextDataThe Custom Data that will be passed along the Context.
fileExtensionThe Models inside the Zip file extension. If null TriLib will try to find a suitable model format inside the Zip file.
haltTaskTurn on this field to avoid loading the models immediately and chain the Tasks.
onPreLoadThe method to call on the parallel Thread before the Unity objects are created.