Editor Scripting API
    // Import built in helpers
    import * as Utils from 'LensStudio:Utils@1.0.js';

    // In the plugin create function
    const model = pluginSystem.findInterface(Editor.Model.IModel);
    const assetManager = model.project.assetManager;
    const destination = destination;

    const material = const assetManager.createNativeAsset('Material', 'Material Name', destination);

    const absGraphPath = new Editor.Path(params.graph_path);
    const pass = await Utils.findOrCreateAsync(assetManager, absGraphPath, destination);
    const passInfo = material.addPass(pass);

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    blendMode: BlendMode
    colorMask: any
    cullMode: CullMode
    defines: string[]
    depthFunction: DepthFunction
    depthTest: boolean
    depthWrite: boolean
    frustumCulling: FrustumCullMode
    id: Uuid

    The unique id of the entity.

    instanceCount: number
    polygonOffset: vec2
    twoSided: boolean
    type: string

    The entity's type.

    Methods

    • Beta

      Returns string[]

    • 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