TriLib 2.2.8
|
Represents an Asset Loader class which works with Zip files. More...
Static Public Member Functions | |
static AssetLoaderContext | LoadModelFromZipFile (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 a model from the given Zip file path asynchronously. | |
static AssetLoaderContext | LoadModelFromZipStream (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, string modelFilename=null, Action< AssetLoaderContext > onPreLoad=null) |
Loads a model from the given Zip file Stream asynchronously. | |
static AssetLoaderContext | LoadModelFromZipFileNoThread (string path, Action< IContextualizedError > onError=null, GameObject wrapperGameObject=null, AssetLoaderOptions assetLoaderOptions=null, object customContextData=null, string fileExtension=null) |
Loads a model from the given Zip file path synchronously. | |
static AssetLoaderContext | LoadModelFromZipStreamNoThread (Stream stream, Action< IContextualizedError > onError, GameObject wrapperGameObject=null, AssetLoaderOptions assetLoaderOptions=null, object customContextData=null, string fileExtension=null) |
Loads a model from the given Zip file Stream synchronously. | |
static Stream | ZipFileEntryToStream (out string fileExtension, ZipEntry zipEntry, ZipFile zipFile) |
Copies the contents of a Zip file Entry into a Memory Stream. | |
Represents an Asset Loader class which works with Zip files.
|
static |
Loads a model from the given Zip file path asynchronously.
path | The Zip file path. |
onLoad | The Method to call on the Main Thread when the Model is loaded but resources may still pending. |
onMaterialsLoad | The Method to call on the Main Thread when the Model and resources are loaded. |
onProgress | The Method to call when the Model loading progress changes. |
onError | The Method to call on the Main Thread when any error occurs. |
wrapperGameObject | The Game Object that will be the parent of the loaded Game Object. Can be null. |
assetLoaderOptions | The options to use when loading the Model. |
customContextData | The Custom Data that will be passed along the Context. |
fileExtension | The Model inside the Zip file extension. If null TriLib will try to find a suitable model format inside the Zip file. |
haltTask | Turn on this field to avoid loading the model immediately and chain the Tasks. |
onPreLoad | The method to call on the parallel Thread before the Unity objects are created. |
|
static |
Loads a model from the given Zip file path synchronously.
path | The Zip file path. |
onError | The Method to call on the Main Thread when any error occurs. |
wrapperGameObject | The Game Object that will be the parent of the loaded Game Object. Can be null. |
assetLoaderOptions | The options to use when loading the Model. |
customContextData | The Custom Data that will be passed along the Context. |
fileExtension | The Model inside the Zip file extension. If null TriLib will try to find a suitable model format inside the Zip file. |
|
static |
Loads a model from the given Zip file Stream asynchronously.
stream | The Stream containing the Zip data. |
onLoad | The Method to call on the Main Thread when the Model is loaded but resources may still pending. |
onMaterialsLoad | The Method to call on the Main Thread when the Model and resources are loaded. |
onProgress | The Method to call when the Model loading progress changes. |
onError | The Method to call on the Main Thread when any error occurs. |
wrapperGameObject | The Game Object that will be the parent of the loaded Game Object. Can be null. |
assetLoaderOptions | The options to use when loading the Model. |
customContextData | The Custom Data that will be passed along the Context. |
fileExtension | The Model inside the Zip file extension. If null TriLib will try to find a suitable model format inside the Zip file. |
haltTask | Turn on this field to avoid loading the model immediately and chain the Tasks. |
///
modelFilename | The Zip file path. |
onPreLoad | The method to call on the parallel Thread before the Unity objects are created. |
|
static |
Loads a model from the given Zip file Stream synchronously.
stream | The Stream containing the Zip data. |
onError | The Method to call on the Main Thread when any error occurs. |
wrapperGameObject | The Game Object that will be the parent of the loaded Game Object. Can be null. |
assetLoaderOptions | The options to use when loading the Model. |
customContextData | The Custom Data that will be passed along the Context. |
fileExtension | The Model inside the Zip file extension. If null TriLib will try to find a suitable model format inside the Zip file. |
|
static |
Copies the contents of a Zip file Entry into a Memory Stream.
fileExtension | The Model inside the Zip file extension. |
zipEntry | The Zip file Entry. |
zipFile | The Zip file instance. |