Events
Events are triggered by certain criteria and can be bound in scripts to execute code. See also: Script Events Guide
BrowsLoweredEvent
Triggered when eyebrows are lowered on the tracked face.
BrowsLoweredEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
BrowsRaisedEvent
Triggered when eyebrows are raised on the tracked face.
BrowsRaisedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
BrowsReturnedToNormalEvent
Triggered when eyebrows are returned to normal on the tracked face.
BrowsReturnedToNormalEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
CameraBackEvent
Triggered when the device's back facing camera becomes active.
CameraBackEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
CameraFrontEvent
Triggered when the device's front facing camera becomes active.
CameraFrontEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
ConnectedLensEnteredEvent
Event fired when the "Launch connected lens" button was pressed. Wait for this event to be triggered before creating a session, as having this event gaurantees the user has accepted the necessary disclosures to use a connected lens experience.
ConnectedLensEnteredEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
DelayedCallbackEvent
An event that gets triggered after a delay.
DelayedCallbackEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
FaceFoundEvent
Triggered when a new face is detected and starts being tracked.
FaceFoundEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
FaceLostEvent
Triggered when a face can no longer be tracked. For example, if a face gets blocked from the camera's view, or gets too far away.
FaceLostEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
FaceTrackingEvent
This is the base class for all face tracking events. This event won't actually get triggered itself, so use one of the child classes instead.
FaceTrackingEventBrowsLoweredEvent, BrowsRaisedEvent, BrowsReturnedToNormalEvent, FaceFoundEvent, FaceLostEvent, KissFinishedEvent, KissStartedEvent, MouthClosedEvent, MouthOpenedEvent, SmileFinishedEvent, SmileStartedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
IEventParameters
The base class for parameter objects passed into event callbacks.
IEventParametersSceneEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
KissFinishedEvent
Triggered when the tracked face ends a kiss.
KissFinishedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
KissStartedEvent
Triggered when the tracked face starts a kiss.
KissStartedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
LateUpdateEvent
This event is triggered at the end of every frame, after normal UpdateEvents trigger but before rendering occurs.
LateUpdateEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
ManipulateEndEvent
This event is triggered when manipulation on the object ends.
ManipulateEndEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
ManipulateStartEvent
This event is triggered when manipulation on the object begins.
ManipulateStartEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
MouthClosedEvent
Triggered when the tracked face's mouth closes.
MouthClosedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
MouthOpenedEvent
Triggered when the tracked face's mouth opens.
MouthOpenedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
OnAwakeEvent
Triggered when the Lens starts, earlier than all OnStart events. Also fires immediately on a newly instantiated or copied object.
OnAwakeEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
OnDestroyEvent
Triggered when the associated ScriptComponent is destroyed while the lens is running.
OnDestroyEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
OnDisableEvent
Triggered when the ScriptComponent this event is bound to is disabled.
OnDisableEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
OnEnableEvent
Triggered when the ScriptComponent this event is bound to is enabled.
OnEnableEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
OnStartEvent
Triggered when the Lens starts, after all OnAwakeEvents have triggered. Also triggers later on newly instantiated or copied objects.
OnStartEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
SceneEvent
The base class for scenewide events. SceneEvents can be created using ScriptComponent's createEvent method.
SceneEventCameraBackEvent, CameraFrontEvent, ConnectedLensEnteredEvent, DelayedCallbackEvent, FaceTrackingEvent, LateUpdateEvent, OnAwakeEvent, OnDestroyEvent, OnDisableEvent, OnEnableEvent, OnStartEvent, SceneObjectEvent, SnapImageCaptureEvent, SnapRecordStartEvent, SnapRecordStopEvent, WorldTrackingResetEvent, TurnOffEvent, TurnOnEvent, UpdateEvent, WorldTrackingMeshesAddedEvent, WorldTrackingMeshesRemovedEvent, WorldTrackingMeshesUpdatedEvent, WorldTrackingPlanesAddedEvent, WorldTrackingPlanesRemovedEvent, WorldTrackingPlanesUpdatedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
SceneObjectEvent
Base class for all object-based Event types in Lens Studio (ManipulateStartEvent, TapEvent, etc.).
SceneObjectEventManipulateEndEvent, ManipulateStartEvent, TapEvent, TouchEndEvent, TouchMoveEvent, TouchStartEvent, TriggerPrimaryEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
SmileFinishedEvent
Triggered when a smile ends on the tracked face.
SmileFinishedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
SmileStartedEvent
Triggered when a smile begins on the tracked face.
SmileStartedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
SnapImageCaptureEvent
Called when the user taps on the capture button to record an image.
SnapImageCaptureEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
SnapRecordStartEvent
Gets called when the user starts long pressing the capture button to record a Snap.
SnapRecordStartEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
SnapRecordStopEvent
Gets called when the user stops long pressing the Snap button to end recording of a Snap.
SnapRecordStopEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
TapEvent
This event is triggered when the user taps on the screen.
TapEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
TouchEndEvent
Triggered when a touch event ends.
TouchEndEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
TouchMoveEvent
Triggered when a touch position on the screen is moved.
TouchMoveEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
TouchStartEvent
Triggered when a touch event starts.
TouchStartEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
TriggerPrimaryEvent
Gets called when the user triggers the primary input on their device. For example touch on touch screens.
TriggerPrimaryEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
TurnOffEvent
Triggered when the lens turns off.
TurnOffEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
[DEPRECATED] TurnOnEvent
This event has been deprecated, please use the OnStartEvent instead.
Triggered when the lens turns on.
TurnOnEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
UpdateEvent
Triggered every frame.
UpdateEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
WorldTrackingMeshesAddedEvent
Triggered when new world tracking meshes are detected. Only available when a Device Tracking component is in the scene, and world mesh tracking is supported and enabled.
WorldTrackingMeshesAddedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
WorldTrackingMeshesRemovedEvent
Triggered when some world tracking meshes are no longer detected. Only available when a Device Tracking component is in the scene, and world mesh tracking is supported and enabled.
WorldTrackingMeshesRemovedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
WorldTrackingMeshesUpdatedEvent
Triggered when world tracking meshes are updated. Only available when a Device Tracking component is in the scene, and world mesh tracking is supported and enabled.
WorldTrackingMeshesUpdatedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
WorldTrackingPlanesAddedEvent
Triggered when plane(s) are newly detected. The worldOptions.nativePlaneTrackingType must be set to anything other than NativePlaneTrackingType.None. In addition, Device Tracking component must be set to World mode to orient the Camera relative to the planes correctly.
WorldTrackingPlanesAddedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
WorldTrackingPlanesRemovedEvent
Triggered when plane(s) are no longer detected. This usually happens when two planes merge into one. Planes persist when no longer seen by camera(s) and when previously detected objects move (e.g. a door is opened) to create a static scene. Device Tracking component must be set to World mode to orient the Camera relative to the planes correctly.
WorldTrackingPlanesRemovedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
WorldTrackingPlanesUpdatedEvent
Triggered when currently detected plane(s) are updated. This usually happens when a plane grows in size. The worldOptions.nativePlaneTrackingType must be set to anything other than NativePlaneTrackingType.None. In addition, Device Tracking component must be set to World mode to orient the Camera relative to the planes correctly.
WorldTrackingPlanesUpdatedEventThis is the API for Lens Studio 4. For the latest API documentation, click here.
WorldTrackingResetEvent
If a DeviceTracking component is present in the scene, this event is triggered when the tracking is restarted (typically when the Lens starts, or if the user taps the ground).
WorldTrackingResetEventThis is the API for Lens Studio 4. For the latest API documentation, click here.