TriLib 2.3.8
|
Represents a class to download and load Models. More...
Public Types | |
enum | HttpRequestMethod { Get , Post , Put , Delete , Head } |
Represents an HTTP Request method. More... | |
Static Public Member Functions | |
static UnityWebRequest | CreateWebRequest (string uri, HttpRequestMethod httpRequestMethod=HttpRequestMethod.Get, string data=null, int timeout=2000) |
Creates a Unity Web Request from the given parameters. | |
static Coroutine | LoadModelFromUri (UnityWebRequest unityWebRequest, 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? isZipFile=null, bool haltTask=false) |
Loads a Model from the given URI Asynchronously (Accepts zip files). | |
Represents a class to download and load Models.
|
static |
Creates a Unity Web Request from the given parameters.
uri | The Request URI (URL). |
httpRequestMethod | The HTTP Request method to use. |
data | The Custom Data that was sent along the Request. |
timeout | The Request timeout in seconds). |
|
static |
Loads a Model from the given URI Asynchronously (Accepts zip files).
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. |
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 extension of the URI Model or the Model inside the Zip file. |
isZipFile | Pass true if your file is a Zip file. |
haltTask | Turn on this field to avoid loading the model immediately and chain the Tasks. |