LensStudio:ModelUi
ModuleThe LensStudio:ModelUi module for Lens Studio plugins.
Before using anything in this namespace, make sure to import LensStudio:ModelUI.
Example
// LensStudio:ModelUi provides EntityReferencePickerLine, a widget
// that lets users pick scene entities by type.
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const assetManager = model.project.assetManager;
const protoRegistry = this.pluginSystem.findInterface(
Editor.Model.IEntityPrototypeRegistry.interfaceId
) as Editor.Model.IEntityPrototypeRegistry;
const root = new Widget(parent);
const layout = new BoxLayout();
layout.setDirection(Direction.TopToBottom);
root.layout = layout;
const label = new Label(root);
label.text = 'Pick a SceneObject:';
layout.addWidget(label);
const picker = new EntityReferencePickerLine(assetManager, protoRegistry, 'SceneObject', root);
layout.addWidget(picker);
Classes
| Class | Description |
|---|---|
| EntityReferencePickerLine | Line edit widget for picking entity references by type, backed by an asset manager and entity prototype registry. |