LensStudio:Preset.Descriptor
ClassDescriptor subclass for presets, extending BaseDescriptor with preset-specific metadata such as import paths and section.
Index
Properties
Methods
Example
// Preset.Descriptor extends BaseDescriptor and adds properties that
// configure how the preset appears in the Add menu.
const d = new Descriptor();
d.id = 'com.docs.PresetDescriptorExample';
d.name = 'Camera Rig';
d.entityType = 'SceneObject';
d.section = 'Camera';
d.pathsToImport = [new Editor.Path('assets/camera_rig.lso')];
// d.icon = Editor.Icon.fromFile(...);
Extends
Constructors
Constructor
new Descriptor():
Descriptor
Constructs a new Preset Descriptor instance.
Returns
Descriptor
Overrides
BaseDescriptor.constructor
Properties
dependencies
dependencies:
InterfaceId[]
Array of interface IDs that this plugin requires to function.
Inherited from
description
description:
string
Human-readable description of the plugin shown in the plugin manager.
Inherited from
entityType
entityType:
string
Specifies the target entity type the preset operates on: 'SceneObject', 'Asset', or 'Component'.
icon
icon:
Icon
Icon displayed for the preset in the Lens Studio UI, created via Editor.Icon.fromFile().
id
id:
string
Unique identifier for the plugin, typically in reverse domain notation.
Inherited from
intendedPlatforms
intendedPlatforms:
TargetPlatform[]
Array of target platforms (Snapchat, Spectacles) where this plugin is intended to run.
Inherited from
BaseDescriptor.intendedPlatforms
interfaces
interfaces:
InterfaceId[]
Array of interface IDs that this plugin provides or implements.
Inherited from
name
name:
string
Display name of the plugin.
Inherited from
pathsToImport
pathsToImport:
Path[]
List of asset paths to import when the preset is instantiated.
section
section:
string
Category or group name under which the preset appears in the preset picker UI.
Methods
getTypeName()
staticgetTypeName():string
Returns the type name of this class.
Returns
string
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object is of the specified type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object refers to the same instance as the given object.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean