|
AsImpL 1.0
Asynchronous Importer and run-time Loader for Unity
|
Abstract loader to be used as a base class for specific loaders. More...
Classes | |
| struct | BuildStats |
| struct | Stats |
Public Member Functions | |
| IEnumerator | Load (string objName, string absolutePath, Transform parentObj) |
| Load a model. More... | |
| abstract string[] | ParseTexturePaths (string absolutePath) |
| Parse the model to get a list of the paths of all used textures More... | |
Static Public Member Functions | |
| static GameObject | GetModelByPath (string absolutePath) |
| Get a previusly loaded model by its absolute path More... | |
Public Attributes | |
| ImportOptions | buildOptions |
| Options to define how the model will be loaded and imported. More... | |
Static Public Attributes | |
| static LoadingProgress | totalProgress = new LoadingProgress() |
| Total loading progress, for all the models currently loading. More... | |
Protected Member Functions | |
| abstract IEnumerator | LoadModelFile (string absolutePath) |
| Load the main model file More... | |
| abstract IEnumerator | LoadMaterialLibrary (string absolutePath) |
| Load the material library from the given path. More... | |
| IEnumerator | Build (string absolutePath, string objName, Transform parentTransform) |
| Build the game objects from data set, materials and textures. More... | |
| string | GetDirName (string absolutePath) |
| Get the directory name of the given path, appending the final slash if eeded. More... | |
| virtual void | OnLoaded (GameObject obj, string absolutePath) |
| virtual void | OnCreated (GameObject obj, string absolutePath) |
| virtual void | OnLoadFailed (string absolutePath) |
Protected Attributes | |
| DataSet | dataSet = new DataSet() |
| ObjectBuilder | objectBuilder = null |
| List< MaterialData > | materialData |
| SingleLoadingProgress | objLoadingProgress = new SingleLoadingProgress() |
| Stats | loadStats |
Static Protected Attributes | |
| static float | LOAD_PHASE_PERC = 8f |
| static float | TEXTURE_PHASE_PERC = 1f |
| static float | MATERIAL_PHASE_PERC = 1f |
| static float | BUILD_PHASE_PERC = 90f |
| static Dictionary< string, GameObject > | loadedModels = new Dictionary<string, GameObject>() |
| static Dictionary< string, int > | instanceCount = new Dictionary<string, int>() |
Properties | |
| ObjectBuilder?? | ObjectBuilder [getset] |
| Warning! This will be removed soon to avoid confusion between the ObjectBuilder class and this property, use Builder property instead. More... | |
| ObjectBuilder?? | Builder [getset] |
| Object used to build the game object hierarchy (it is created if not previously set). More... | |
| bool? | ConvertVertAxis [getset] |
| Load the file assuming its vertical axis is Z instead of Y More... | |
| float? | Scaling [getset] |
| Rescaling for the model (1 = no rescaling) More... | |
| IFilesystem | Filesystem [getset] |
| abstract bool | HasMaterialLibrary [get] |
| Check if a material library is defined for this model More... | |
Events | |
| Action< GameObject, string > | ModelCreated |
| Event triggered when an object is created. More... | |
| Action< GameObject, string > | ModelLoaded |
| Event triggered when an object is successfully loaded. More... | |
| Action< string > | ModelError |
| Event triggered if failed to load an object More... | |
Abstract loader to be used as a base class for specific loaders.
|
protected |
Build the game objects from data set, materials and textures.
| absolutePath | absolute file path |
| objName | Name of the main game object (model root) |
| parentTransform | transform to which the model root will be attached (if null it will be a root aobject) |
This is called by Load() method
|
protected |
Get the directory name of the given path, appending the final slash if eeded.
| absolutePath | the absolute path |
/
|
static |
Get a previusly loaded model by its absolute path
| absolutePath | absolute path used to load the model |
| IEnumerator AsImpL.Loader.Load | ( | string | objName, |
| string | absolutePath, | ||
| Transform | parentObj | ||
| ) |
Load a model.
| objName | name of the GameObject, if empty use file name |
| absolutePath | absolute file path |
| parentObj | Transform to which attach the loaded object (null=scene) |
|
protectedpure virtual |
Load the material library from the given path.
| absolutePath | absolute file path |
This is called by Load() method
Implemented in AsImpL.LoaderObj.
|
protectedpure virtual |
Load the main model file
| absolutePath | absolute file path |
This is called by Load() method
Implemented in AsImpL.LoaderObj.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
pure virtual |
Parse the model to get a list of the paths of all used textures
| absolutePath | absolute path of the model |
Implemented in AsImpL.LoaderObj.
|
staticprotected |
| ImportOptions AsImpL.Loader.buildOptions |
Options to define how the model will be loaded and imported.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
static |
Total loading progress, for all the models currently loading.
|
getset |
Object used to build the game object hierarchy (it is created if not previously set).
|
getset |
Load the file assuming its vertical axis is Z instead of Y
|
getset |
|
getprotected |
Check if a material library is defined for this model
|
getset |
Warning! This will be removed soon to avoid confusion between the ObjectBuilder class and this property, use Builder property instead.
|
getset |
Rescaling for the model (1 = no rescaling)
| Action<GameObject, string> AsImpL.Loader.ModelCreated |
Event triggered when an object is created.
| Action<string> AsImpL.Loader.ModelError |
Event triggered if failed to load an object
| Action<GameObject, string> AsImpL.Loader.ModelLoaded |
Event triggered when an object is successfully loaded.