Preparing search index...

    Represents the open Lens Studio project, providing access to the scene, asset manager, and project settings.

        const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const project = model.project;

    console.log(`Project file: ${project.projectFile}`);
    console.log(`Project directory: ${project.projectDirectory}`);
    console.log(`Assets directory: ${project.assetsDirectory}`);
    console.log(`Cache directory: ${project.cacheDirectory}`);

    const scene = project.scene;
    const rootObjects = scene.rootSceneObjects;
    console.log(`Scene root objects: ${rootObjects.length}`);

    const assetManager = project.assetManager;
    console.log(`Total assets: ${assetManager.assets.length}`);

    const metaInfo = project.metaInfo;
    console.log(`Project meta info: ${metaInfo}`);

    // Listen for entity additions (SceneObject type as example)
    const conn = project.onEntityAdded('SceneObject').connect((entity) => {
    console.log(`Entity added: ${entity.type}`);
    });
    this.connections.push(conn);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    assetManager: AssetManager

    The asset manager for this project, used to create, find, and manage all project assets.

    assetsDirectory: Path

    Path to the project's assets directory on disk.

    cacheDirectory: Path

    Path to the project's cache directory on disk.

    history: any

    The undo/redo history stack for this project.

    metaInfo: MetaInfo

    Metadata associated with the project, such as name and version info.

    projectDirectory: Path

    Root directory path of the project on disk.

    projectFile: Path

    Path to the project's main file on disk.

    scene: Scene

    The active scene for this project, containing all scene objects and cameras.

    Methods

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

      Parameters

      • type: string

      Returns boolean

    • Returns a signal that fires after an entity of the given type name has been added to the project.

      Parameters

      • typeName: string

      Returns signal1<Entity, void>

    • Returns a signal that fires just before an entity of the given type name is added to the project.

      Parameters

      • typeName: string

      Returns signal1<Entity, void>

    • Returns a signal that fires after an entity of the given type name has been removed, providing its UUID.

      Parameters

      • typeName: string

      Returns signal1<Uuid, void>

    • Returns a signal that fires after an entity of the given type name has been updated.

      Parameters

      • typeName: string

      Returns signal1<Entity, void>

    • Returns a signal that fires just before an entity of the given type name is updated.

      Parameters

      • typeName: string

      Returns signal1<Entity, void>

    • Saves the project to its current file location.

      Returns void

    • Saves the project to a specified file path.

      Parameters

      • absoluteFilePath: Path

      Returns void