Editor Scripting API
    // 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, Expand)

    Index

    Constructors

    Properties

    cacheFile: Path
    height: number
    id: Uuid

    The unique id of the entity.

    name: string

    The name of the asset.

    texture: FileTexture
    type: string

    The entity's type.

    Methods

    • Beta

      Parameters

      • type: string

      Returns boolean

    • Beta

      Swap this entity for another one based on a JSON of the current entity id and the target entity id.

      Parameters

      • referenceMapping: object

      Returns void

    MMNEPVFCICPMFPCPTTAAATR