Preparing search index...

    Interface for writing serializable data.

        // IWriter serializes data to a string. Obtain one via Yaml.createWriter()
    // (the constructor is protected). The resulting writer can be passed to
    // APIs that persist state — for example, Editor.Dock.IDockManager.write()
    // dumps the current dock layout and panel identifiers into the writer.
    const { Yaml } = await import('LensStudio:Serialization');

    const writer = Yaml.createWriter();

    // Serialize the current dock layout (panel IDs + attached/detached state)
    // through the IDockManager interface. This writes scene object-style
    // properties into the writer.
    const dockManager = this.pluginSystem.findInterface(
    Editor.Dock.IDockManager.interfaceId
    ) as unknown as Editor.Dock.IDockManager;

    if (!Editor.isNull(dockManager)) {
    dockManager.write(writer);
    }

    // getString() returns the YAML output — a structured, JSON-like string
    // describing every panel and its dock state. It can be round-tripped
    // through Yaml.createReader() and IDockManager.read() to restore layout.
    const serialized = writer.getString();
    console.log('IWriter produced', serialized.length, 'bytes of YAML');
    console.log(serialized);

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Beta

      Get the serialized output as a string.

      Returns string

    • Beta

      Returns the name of this object's type.

      Returns string

    • Beta

      Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean