TriLib 2.2.8
|
Represents a class used to download Models with Coroutines used by the Asset Downloader. More...
Public Member Functions | |
IEnumerator | DownloadAsset (UnityWebRequest unityWebRequest, Action< AssetLoaderContext > onLoad, Action< AssetLoaderContext > onMaterialsLoad, Action< AssetLoaderContext, float > onProgress, GameObject wrapperGameObject, Action< IContextualizedError > onError, AssetLoaderOptions assetLoaderOptions, object customContextData, string fileExtension, bool? isZipFile=null) |
Downloads the Model using the given Request and options. | |
Represents a class used to download Models with Coroutines used by the Asset Downloader.
IEnumerator TriLibCore.AssetDownloaderBehaviour.DownloadAsset | ( | UnityWebRequest | unityWebRequest, |
Action< AssetLoaderContext > | onLoad, | ||
Action< AssetLoaderContext > | onMaterialsLoad, | ||
Action< AssetLoaderContext, float > | onProgress, | ||
GameObject | wrapperGameObject, | ||
Action< IContextualizedError > | onError, | ||
AssetLoaderOptions | assetLoaderOptions, | ||
object | customContextData, | ||
string | fileExtension, | ||
bool? | isZipFile = null |
||
) |
Downloads the Model using the given Request and options.
unityWebRequest | The Unity Web Request used to load the Model. You can use the CreateWebRequest method to create a new Unity Web Request or pass your instance. |
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. |
wrapperGameObject | The Game Object that will be the parent of the loaded Game Object. Can be null. |
onError | The Method to call on the Main Thread when any error occurs. |
assetLoaderOptions | The options to use when loading the Model. |
customContextData | The Custom Data that will be passed along the Context. |
fileExtension | The extension of the URI Model. |
isZipFile | Pass true if your file is a Zip file. |