AsImpL 1.0
Asynchronous Importer and run-time Loader for Unity
AsImpL.ObjectImporter Class Reference

Component that imports objects from a model, both at run-rime and as assets in Editor. More...

Inheritance diagram for AsImpL.ObjectImporter:
AsImpL.MultiObjectImporter

Public Member Functions

void ImportModelAsync (string objName, string filePath, Transform parentObj, ImportOptions options)
 Request to load a file asynchronously. More...
 
virtual void UpdateStatus ()
 Update the loading/importing status More...
 

Protected Member Functions

virtual void Update ()
 
virtual void OnImportingComplete ()
 Called when finished importing. More...
 
virtual void OnModelCreated (GameObject obj, string absolutePath)
 Called when each model has been created and before it is imported. More...
 
virtual void OnImported (GameObject obj, string absolutePath)
 Called when each model has been imported. More...
 
virtual void OnImportError (string absolutePath)
 Called when a model import fails. More...
 

Protected Attributes

int numTotalImports = 0
 
bool allLoaded = false
 
ImportOptions buildOptions
 
List< LoaderloaderList
 

Properties

int NumImportRequests [get]
 Number of pending import activities. More...
 

Events

Action ImportingStart
 Event triggered when starting to import. More...
 
Action ImportingComplete
 Event triggered when finished importing. More...
 
Action< GameObject, string > CreatedModel
 Event triggered when a single model has been created and before it is imported. More...
 
Action< GameObject, string > ImportedModel
 Event triggered when a single model has been successfully imported. More...
 
Action< string > ImportError
 Event triggered when an error occurred importing a model. More...
 

Detailed Description

Component that imports objects from a model, both at run-rime and as assets in Editor.

Member Function Documentation

◆ ImportModelAsync()

void AsImpL.ObjectImporter.ImportModelAsync ( string  objName,
string  filePath,
Transform  parentObj,
ImportOptions  options 
)

Request to load a file asynchronously.

Parameters
objName
filePath
parentObj
options

◆ OnImported()

virtual void AsImpL.ObjectImporter.OnImported ( GameObject  obj,
string  absolutePath 
)
protectedvirtual

Called when each model has been imported.

It triggers ImportedModel event, if it was set.

◆ OnImportError()

virtual void AsImpL.ObjectImporter.OnImportError ( string  absolutePath)
protectedvirtual

Called when a model import fails.

It triggers ImportError event, if it was set.

◆ OnImportingComplete()

virtual void AsImpL.ObjectImporter.OnImportingComplete ( )
protectedvirtual

Called when finished importing.

It triggers ImportingComplete event, if it was set.

◆ OnModelCreated()

virtual void AsImpL.ObjectImporter.OnModelCreated ( GameObject  obj,
string  absolutePath 
)
protectedvirtual

Called when each model has been created and before it is imported.

It triggers CreatedModel event, if it was set.

◆ Update()

virtual void AsImpL.ObjectImporter.Update ( )
protectedvirtual

◆ UpdateStatus()

virtual void AsImpL.ObjectImporter.UpdateStatus ( )
virtual

Update the loading/importing status

Member Data Documentation

◆ allLoaded

bool AsImpL.ObjectImporter.allLoaded = false
protected

◆ buildOptions

ImportOptions AsImpL.ObjectImporter.buildOptions
protected

◆ loaderList

List<Loader> AsImpL.ObjectImporter.loaderList
protected

◆ numTotalImports

int AsImpL.ObjectImporter.numTotalImports = 0
protected

Property Documentation

◆ NumImportRequests

int AsImpL.ObjectImporter.NumImportRequests
get

Number of pending import activities.

Event Documentation

◆ CreatedModel

Action<GameObject, string> AsImpL.ObjectImporter.CreatedModel

Event triggered when a single model has been created and before it is imported.

◆ ImportedModel

Action<GameObject, string> AsImpL.ObjectImporter.ImportedModel

Event triggered when a single model has been successfully imported.

◆ ImportError

Action<string> AsImpL.ObjectImporter.ImportError

Event triggered when an error occurred importing a model.

◆ ImportingComplete

Action AsImpL.ObjectImporter.ImportingComplete

Event triggered when finished importing.

◆ ImportingStart

Action AsImpL.ObjectImporter.ImportingStart

Event triggered when starting to import.


The documentation for this class was generated from the following file: