Preparing search index...

    Manages project assets — creating, importing, finding, and organizing assets within the project.

        const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const assetManager = model.project.assetManager;

    console.log(`Total assets: ${assetManager.assets.length}`);
    console.log(`Assets directory: ${assetManager.assetsDirectory}`);
    console.log(`Cache directory: ${assetManager.cacheDirectory}`);

    for (const asset of assetManager.assets.slice(0, 5)) {
    console.log(` Asset: ${asset.name} (${asset.getTypeName()})`);
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    assets: Editor.Assets.Asset[]

    Array of all assets currently loaded in the project.

    assetsDirectory: Path

    Absolute path to the project's assets directory.

    cacheDirectory: Path

    Absolute path to the project's asset cache directory.

    Methods

    • Creates a new native asset of the specified type at the given destination path and returns it.

      Parameters

      • assetType: string
      • baseName: string
      • relativeDestinationDir: SourcePath

      Returns Editor.Assets.Asset

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean

    • Removes an asset from the project.

      Parameters

      Returns void