Skip to main content

Editor.Model.ImportSettings

Class

Settings object describing how a model import operation was configured.

Index

Properties

Methods

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

readonly aborted: boolean

Whether the import operation was aborted before completion.

Methods

create()

static create(importerSettings): ImportSettings

Parameters

ParameterType
importerSettingsAssetImporterSettings

Returns

ImportSettings