Skip to main content

Project & Scene

The open project and its scene: scene objects, entities, layers, the asset manager, and import and export.

Commonly used

Guides

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

APIDescription
LensStudio:EntityGeneratorModule for generating entities within Lens Studio projects.
LensStudio:HierarchyUtils.js

Editor services

APIDescription
IEntityPrototypeRegistryRegistry for entity prototypes, providing methods to create, query, and register entity types within the Editor model.
IEntityRegistryA registry of various entities.
IModelCore plugin component interface providing access to the current Lens Studio project and its lifecycle events.

Objects and data

APIDescription
AssetContextContext object holding the current asset selection, providing access to selected assets and their paths.
AssetImportMetadataA handle for the metadata of an asset.
AssetManagerManages project assets — creating, importing, finding, and organizing assets within the project.
AssetMetaStores metadata for an asset, including type information and associated properties.
BaseChangesStreamBase class for streams that track and apply model changes.
Editor.ModelThe model object is a core concept in the plugin development environment.
Editor.TransformRepresents position, rotation, and scale in 3D space.
EntityAn object in the scene, or asset in the Editor.Model.AssetManager
EntityPrototypeDataDefines prototype data for an entity type, including its display metadata and factory function.
EntityStructureEntity subclass representing the structural organization of entities within a scene.
ExportOptionsOptions controlling how a model is exported, including dependency handling and packaging policy.
ExternalPackageDependencyRepresents an external package dependency, including its import metadata and version configuration.
ImportResultThe result of Editor.Model.AssetManager.importExternalFile and Editor.Model.AssetManager.importExternalFileAsync.
ImportSettingsSettings object describing how a model import operation was configured.
InspectableMetaMetadata for an inspectable object, providing display caption and icon for use in the Editor UI.
InstantiationParamsParameters used when instantiating a scene object, including its parent hierarchy.
LayerThe layers within a Editor.Model.LayerSet.
LayerIdThe id of a Editor.Model.Layer.
LayersThe layers of a {@Editor.Assets.Scene}.
LayerSetRepresents an immutable set of scene layers, supporting set operations like union, intersection, and difference.
MetaThe metadata of an entity.
MetaInfoMetadata of the current project's Lens.
ObjectContextContext scoped to a set of scene objects, providing access to the current object selection.
PrefabableAn entity which can be turned into a prefab, such as Editor.Model.SceneObject.
ProjectRepresents the open Lens Studio project, providing access to the scene, asset manager, and project settings.
SceneObjectA node in the scene hierarchy, holding components and child scene objects.
SourcePathRepresents a file path within a Lens Studio project, combining a root-relative path with a source root directory.
TransformEntityEntity that carries a spatial transform, representing position, rotation, and scale in the scene.
WorldTransformAccessorProvides read and write access to an entity's world-space transform.

Enums

APIDescription
DeviceTypeEnum representing the target device type for a Lens Studio project.
EntityBaseTypeEnum defining the base types an entity prototype can represent.
FindOptionEnum of options controlling model lookup behavior.
LensActivationCameraThe various cameras which will be activated when this project's Lens turns on.
LensApplicabilityThe various contexts in which this Lens can be used.
LensClientCompatibilityEnumerates the client surfaces a Lens can target for distribution.
PackageOptionEnum representing the packaging state of an asset or resource.
ProjectSaveModeEnum controlling how and when a project is saved.
ResultTypeHow a file should be imported into the project.
SourceRootDirectoryEnum identifying the root directory context for resolving source paths within a Lens Studio project.