Editor.Model.ImportSettings
ClassSettings object describing how a model import operation was configured.
Index
Example
// ImportSettings is passed as an optional parameter to importExternalFile()
// and importExternalFileAsync(). It has a protected constructor.
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const assetManager = model.project.assetManager;
// The full import signature:
// assetManager.importExternalFile(sourcePath, destDir?, resultType?, importSettings?)
// ImportSettings has a protected constructor -- the engine creates it internally.
// After import, check importSettings.aborted to see if the user cancelled.
const sourcePath = new Editor.Path('/tmp/my_model.fbx');
const result = assetManager.importExternalFile(sourcePath);
if (!Editor.isNull(result.primary)) {
console.log('Import completed, primary asset:', result.primary.name);
}
console.log('Imported files:', result.files.length);
Properties
aborted
readonlyaborted:boolean
Whether the import operation was aborted before completion.
Methods
create()
staticcreate(importerSettings):ImportSettings
Parameters
| Parameter | Type |
|---|---|
importerSettings | AssetImporterSettings |
Returns
ImportSettings