Editor Scripting API

    A native asset that provides information for visual objects rendering. Learn more at LensScripting.Pass.

    // Get access to the project's assetManager
    const model = pluginSystem.findInterface(Editor.Model.IModel);
    const assetManager = model.project.assetManager;

    // Locate the shader pass we want to import
    const resourceLoc = import.meta.resolve('Resources/myMesh.ss_graph');
    const absGraphPath = new Editor.Path(resourceLoc);

    // Import the shader pass
    const meta = await assetManager.importExternalFileAsync(absolutePath, new Editor.Path(''), Editor.Model.ResultType.Packed);
    // You can set meta.primary on a Material asset to use it.

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    cacheFile: Path
    id: Uuid

    The unique id of the entity.

    name: string

    The name of the asset.

    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