Preparing search index...

    Configuration descriptor for a project settings plugin, holding the section and title used to register the panel.

    // Descriptor (from LensStudio:ProjectSettingsPlugin) extends BaseDescriptor
    // and supplies metadata for a settings panel entry: id, name, description,
    // section, title, icon, and dependencies. Lens Studio reads it from your
    // plugin's static descriptor() method to register the panel.
    import { ProjectSettingsPlugin, Descriptor } from 'LensStudio:ProjectSettingsPlugin';
    import * as Ui from 'LensStudio:Ui';

    export class MySettingsPlugin extends ProjectSettingsPlugin {
    root: Ui.Widget | null = null;

    static descriptor(): Descriptor {
    const d = new Descriptor();
    d.id = 'com.docs.ProjectSettingsDescriptorExample';
    d.name = 'My Settings';
    d.description = 'A minimal project settings panel';
    d.section = 'General Settings';
    d.title = 'My Custom Settings';
    // Icon resolved via import.meta.resolve so a bundled icon.svg/png next
    // to the plugin's main module ships with the plugin and is always found.
    d.icon = Editor.Icon.fromFile(new Editor.Path(import.meta.resolve('icon.svg')));
    d.dependencies = [Ui.IGui];
    return d;
    }

    createWidget(parent: Ui.Widget): Ui.Widget {
    this.root = new Ui.Widget(parent);
    const layout = new Ui.BoxLayout();
    layout.setDirection(Ui.Direction.TopToBottom);
    const label = new Ui.Label(this.root);
    label.text = 'Hello from My Settings';
    layout.addWidget(label);
    layout.addStretch(1);
    this.root.layout = layout;
    return this.root;
    }

    deinit(): void {
    if (this.root) { this.root.deleteLater(); this.root = null; }
    }
    }

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    dependencies: InterfaceId[]

    Array of interface IDs that this plugin requires to function.

    description: string

    Human-readable description of the plugin shown in the plugin manager.

    icon: Editor.Icon

    Icon displayed for the settings panel entry.

    id: string

    Unique identifier for the plugin, typically in reverse domain notation.

    intendedPlatforms: TargetPlatform[]

    Array of target platforms (Snapchat, Spectacles) where this plugin is intended to run.

    interfaces: InterfaceId[]

    Array of interface IDs that this plugin provides or implements.

    name: string

    Display name of the plugin.

    section: string

    Section name under which this settings panel is grouped.

    title: string

    Display title shown for this settings panel entry.

    Methods

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

      Parameters

      • type: string

      Returns boolean