Skip to main content

LensStudio:ConnectedLensMonitor.ConnectedLensMonitorSnapshot

Class

Base class for all script-accessible Lens Studio objects.

Index

Example

// ScriptObject is the base class for all native editor objects.
// Use getTypeName() to identify type and Editor.isNull() to check validity.
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const scene = model.project.scene;
const so = scene.addSceneObject(scene.rootSceneObjects[0]);
so.name = 'ScriptObjectDemo';

// getTypeName() returns the native type name
console.log('Type name:', so.getTypeName());

// isOfType() checks type hierarchy
console.log('Is SceneObject:', so.isOfType('SceneObject'));

// Editor.isNull() checks if the native object is still valid
console.log('Is valid:', !Editor.isNull(so));
so.destroy();
console.log('After destroy, isNull:', Editor.isNull(so));

Extends

Properties

hostConnectionId

readonly hostConnectionId: string


isMonitoring

readonly isMonitoring: boolean


messages

readonly messages: ConnectedLensMonitorMessage[]


messagesTruncated

readonly messagesTruncated: boolean


sessionId

readonly sessionId: string


stores

readonly stores: ConnectedLensMonitorStore[]


users

readonly users: ConnectedLensMonitorUser[]

Methods

getTypeName()

static getTypeName(): string

Returns the type name of this class.

Returns

string

Overrides

ScriptObject.getTypeName


getTypeName()

getTypeName(): string

Returns the name of this object's type.

Returns

string

Inherited from

ScriptObject.getTypeName


isOfType()

isOfType(type): boolean

Returns true if the object is of the specified type.

Parameters

ParameterType
typestring

Returns

boolean

Inherited from

ScriptObject.isOfType


isSame()

isSame(other): boolean

Returns true if this object refers to the same instance as the given object.

Parameters

ParameterType
otherScriptObject

Returns

boolean

Inherited from

ScriptObject.isSame