Preparing search index...

    Sets runtime-performance-tuned texture compression with optional mipmaps; assign to AssetImportMetadata.compressionSettings.

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

    const perf = Editor.Assets.PerformanceCompressionSettings.create(scene);
    perf.mipmap = true;
    perf.level = Editor.Assets.TextureCompressionLevel.Medium;

    const tex = model.project.assetManager.assets.find((a) => a.isOfType('FileTexture'));
    if (!Editor.isNull(tex) && !Editor.isNull(tex.fileMeta)) {
    tex.fileMeta.compressionSettings = perf;
    }
    console.log(`PerformanceCompression mipmap=${perf.mipmap} level=${perf.level}`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    id: Uuid

    The unique id of the entity.

    Compression level controlling the quality-versus-size tradeoff.

    meta: Meta

    Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

    mipmap: boolean

    Whether mipmaps are generated and stored alongside the compressed texture.

    type: string

    The entity's type.

    Methods

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

      Parameters

      • type: string

      Returns boolean