TriLib 2.2.8
|
Represents the main class containing methods to load the Models. More...
Static Public Member Functions | |
static AssetLoaderContext | LoadModelFromFile (string path, Action< AssetLoaderContext > onLoad=null, Action< AssetLoaderContext > onMaterialsLoad=null, Action< AssetLoaderContext, float > onProgress=null, Action< IContextualizedError > onError=null, GameObject wrapperGameObject=null, AssetLoaderOptions assetLoaderOptions=null, object customContextData=null, bool haltTask=false, Action< AssetLoaderContext > onPreLoad=null, bool isZipFile=false) |
Loads a Model from the given path asynchronously. | |
static AssetLoaderContext | LoadModelFromStream (Stream stream, string filename=null, string fileExtension=null, Action< AssetLoaderContext > onLoad=null, Action< AssetLoaderContext > onMaterialsLoad=null, Action< AssetLoaderContext, float > onProgress=null, Action< IContextualizedError > onError=null, GameObject wrapperGameObject=null, AssetLoaderOptions assetLoaderOptions=null, object customContextData=null, bool haltTask=false, Action< AssetLoaderContext > onPreLoad=null, bool isZipFile=false) |
Loads a Model from the given Stream asynchronously. | |
static AssetLoaderContext | LoadModelFromFileNoThread (string path, Action< IContextualizedError > onError=null, GameObject wrapperGameObject=null, AssetLoaderOptions assetLoaderOptions=null, object customContextData=null, bool isZipFile=false) |
Loads a Model from the given path synchronously. | |
static AssetLoaderContext | LoadModelFromStreamNoThread (Stream stream, string filename=null, string fileExtension=null, Action< IContextualizedError > onError=null, GameObject wrapperGameObject=null, AssetLoaderOptions assetLoaderOptions=null, object customContextData=null, bool isZipFile=false) |
Loads a Model from the given Stream synchronously. | |
static AssetLoaderOptions | CreateDefaultLoaderOptions (bool generateAssets=false, bool supressWarning=false) |
Creates an Asset Loader Options with the default settings and Mappers. | |
Represents the main class containing methods to load the Models.
|
static |
Creates an Asset Loader Options with the default settings and Mappers.
generateAssets | Indicates whether created Scriptable Objects will be saved as assets. |
supressWarning | Pass true if you are caching your AssetLoaderOptions instance. |
|
static |
Loads a Model from the given path asynchronously.
path | The Model 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. |
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. |
isZipFile | Indicates whether to load from a Zip file. |
|
static |
Loads a Model from the given path synchronously.
path | The Model 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. |
isZipFile | Indicates whether to load from a Zip file. |
|
static |
Loads a Model from the given Stream asynchronously.
stream | The Stream containing the Model data. |
filename | The Model filename. |
fileExtension | The Model file extension. (Eg.: fbx) |
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. |
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. |
isZipFile | Indicates whether to load from a Zip file. |
|
static |
Loads a Model from the given Stream synchronously.
stream | The Stream containing the Model data. |
filename | The Model filename. |
fileExtension | The Model file extension. (Eg.: fbx) |
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. |
isZipFile | Indicates whether to load from a Zip file. |