Preparing search index...
        // ImportResult is returned by AssetManager.importExternalFile().
    // It cannot be constructed directly.
    const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const assetManager = model.project.assetManager;

    // Import an external file into the project
    const sourcePath = new Editor.Path('/tmp/my_model.fbx');
    const result: Editor.Model.ImportResult = assetManager.importExternalFile(sourcePath);

    // Access the primary asset created by the import
    if (!Editor.isNull(result.primary)) {
    console.log('Primary asset name:', result.primary.name);
    }

    // The path where the file was imported
    console.log('Import path:', result.path.toString());

    // Iterate all imported file metadata entries
    for (const fileMeta of result.files) {
    console.log('Imported file assets:', fileMeta.assets.length);
    }
    Index

    Constructors

    Properties

    Constructors

    Properties

    The metadata of the files imported.

    path: Path

    A path to the imported file.

    The asset which is usually referenced after the asset has been imported.