Editor Scripting API
    Preparing search index...
    // Create the asset
    const imageMarker = assetManager.createNativeAsset('ImageMarker', 'Image Marker [EDIT_ME]', destination);

    // Ask user for the file they want to use as image marker
    import * as Ui from 'LensStudio:Ui';
    const gui = pluginSystem.findInterface(Ui.IGui);
    const filename = gui.dialogs.selectFileToOpen({ 'caption': 'Select image for the marker', 'filter': '*.png *.jpeg *.jpg' }, '')

    // Import the image, and use it as the marker's texture
    const importedTextureMeta = await assetManager.importExternalFileAsync(filename, destination, Editor.Model.ResultType.Auto);
    imageMarker.texture = importedTextureMeta.primary;

    Hierarchy (View Summary)

    Index

    Properties

    cacheFile: Path
    height: number
    id: Uuid

    The unique id of the entity.

    meta: Meta
    name: string

    The name of the asset.

    texture: FileTexture
    type: string

    The entity's type.

    Methods

    • Parameters

      • type: string

      Returns boolean