Project & Scene
The open project and its scene: scene objects, entities, layers, the asset manager, and import and export.
Commonly used
IModelCore plugin component interface providing access to the current Lens Studio project and its lifecycle events.ProjectRepresents the open Lens Studio project, providing access to the scene, asset manager, and project settings.Editor.Assets.SceneThe entity which will be converted into the Lens scene during project export.In AssetsSceneObjectA node in the scene hierarchy, holding components and child scene objects.AssetManagerManages project assets — creating, importing, finding, and organizing assets within the project.Editor.TransformRepresents position, rotation, and scale in 3D space.
Guides
Building PluginsYou can build your own plugins to support your own workflow, and even share it to help others.Common TasksBelow are some common tasks you might need to do while creating your plugins.Best PracticesYou can use the Yeoman Generator to accelerate your plugin development process.
All APIs in this topic
Get editor services with this.pluginSystem.findInterface(Editor.Model.IModel) and import modules with import * as Ui from 'LensStudio:Ui'. APIs listed by a short name are in Editor.Model: AssetContext is Editor.Model.AssetContext.
Components, assets, and modules
| API | Description |
|---|---|
| LensStudio:EntityGenerator | Module for generating entities within Lens Studio projects. |
| LensStudio:HierarchyUtils.js |
Editor services
| API | Description |
|---|---|
| IEntityPrototypeRegistry | Registry for entity prototypes, providing methods to create, query, and register entity types within the Editor model. |
| IEntityRegistry | A registry of various entities. |
| IModel | Core plugin component interface providing access to the current Lens Studio project and its lifecycle events. |
Objects and data
| API | Description |
|---|---|
| AssetContext | Context object holding the current asset selection, providing access to selected assets and their paths. |
| AssetImportMetadata | A handle for the metadata of an asset. |
| AssetManager | Manages project assets — creating, importing, finding, and organizing assets within the project. |
| AssetMeta | Stores metadata for an asset, including type information and associated properties. |
| BaseChangesStream | Base class for streams that track and apply model changes. |
| Editor.Model | The model object is a core concept in the plugin development environment. |
| Editor.Transform | Represents position, rotation, and scale in 3D space. |
| Entity | An object in the scene, or asset in the Editor.Model.AssetManager |
| EntityPrototypeData | Defines prototype data for an entity type, including its display metadata and factory function. |
| EntityStructure | Entity subclass representing the structural organization of entities within a scene. |
| ExportOptions | Options controlling how a model is exported, including dependency handling and packaging policy. |
| ExternalPackageDependency | Represents an external package dependency, including its import metadata and version configuration. |
| ImportResult | The result of Editor.Model.AssetManager.importExternalFile and Editor.Model.AssetManager.importExternalFileAsync. |
| ImportSettings | Settings object describing how a model import operation was configured. |
| InspectableMeta | Metadata for an inspectable object, providing display caption and icon for use in the Editor UI. |
| InstantiationParams | Parameters used when instantiating a scene object, including its parent hierarchy. |
| Layer | The layers within a Editor.Model.LayerSet. |
| LayerId | The id of a Editor.Model.Layer. |
| Layers | The layers of a {@Editor.Assets.Scene}. |
| LayerSet | Represents an immutable set of scene layers, supporting set operations like union, intersection, and difference. |
| Meta | The metadata of an entity. |
| MetaInfo | Metadata of the current project's Lens. |
| ObjectContext | Context scoped to a set of scene objects, providing access to the current object selection. |
| Prefabable | An entity which can be turned into a prefab, such as Editor.Model.SceneObject. |
| Project | Represents the open Lens Studio project, providing access to the scene, asset manager, and project settings. |
| SceneObject | A node in the scene hierarchy, holding components and child scene objects. |
| SourcePath | Represents a file path within a Lens Studio project, combining a root-relative path with a source root directory. |
| TransformEntity | Entity that carries a spatial transform, representing position, rotation, and scale in the scene. |
| WorldTransformAccessor | Provides read and write access to an entity's world-space transform. |
Enums
| API | Description |
|---|---|
| DeviceType | Enum representing the target device type for a Lens Studio project. |
| EntityBaseType | Enum defining the base types an entity prototype can represent. |
| FindOption | Enum of options controlling model lookup behavior. |
| LensActivationCamera | The various cameras which will be activated when this project's Lens turns on. |
| LensApplicability | The various contexts in which this Lens can be used. |
| LensClientCompatibility | Enumerates the client surfaces a Lens can target for distribution. |
| PackageOption | Enum representing the packaging state of an asset or resource. |
| ProjectSaveMode | Enum controlling how and when a project is saved. |
| ResultType | How a file should be imported into the project. |
| SourceRootDirectory | Enum identifying the root directory context for resolving source paths within a Lens Studio project. |
Related topics
AssetsEvery asset type a plugin can create or edit, materials and passes, animation clips, Gaussian splats, and the Asset Library.ComponentsEvery component a plugin can add to a scene object and edit.Files & SystemFiles and paths, processes and shells, the clipboard, storage, serialization, crypto, logging, and TypeScript compilation.