Skip to main content

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.

Lens Studio v1.5.0+
Scripting Name: BrowsLoweredEvent
Inherits from FaceTrackingEvent

This is the API for Lens Studio 4. For the latest API documentation, click here.

BrowsRaisedEvent

Triggered when eyebrows are raised on the tracked face.

Lens Studio v1.5.0+
Scripting Name: BrowsRaisedEvent
Inherits from FaceTrackingEvent

This 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.

Lens Studio v1.5.0+
Scripting Name: BrowsReturnedToNormalEvent
Inherits from FaceTrackingEvent

This 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.

Lens Studio v1.0.0+
Scripting Name: CameraBackEvent
Inherits from SceneEvent

This 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.

Lens Studio v1.0.0+
Scripting Name: CameraFrontEvent
Inherits from SceneEvent

This 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.

Lens Studio v4.0+
Scripting Name: ConnectedLensEnteredEvent
Inherits from SceneEvent

This is the API for Lens Studio 4. For the latest API documentation, click here.

DelayedCallbackEvent

An event that gets triggered after a delay.

Lens Studio v1.0.0+
Scripting Name: DelayedCallbackEvent
Inherits from SceneEvent

This 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.

Lens Studio v1.5.0+
Scripting Name: FaceFoundEvent
Inherits from FaceTrackingEvent

This 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.

Lens Studio v1.5.0+
Scripting Name: FaceLostEvent
Inherits from FaceTrackingEvent

This 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.

Lens Studio v1.5.0+
Scripting Name: FaceTrackingEvent
Inherits from SceneEvent

This 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.

Lens Studio v1.0.0+
Scripting Name: IEventParameters
Inherits from ScriptObject
Child Classes: SceneEvent

This is the API for Lens Studio 4. For the latest API documentation, click here.

KissFinishedEvent

Triggered when the tracked face ends a kiss.

Lens Studio v1.5.0+
Scripting Name: KissFinishedEvent
Inherits from FaceTrackingEvent

This is the API for Lens Studio 4. For the latest API documentation, click here.

KissStartedEvent

Triggered when the tracked face starts a kiss.

Lens Studio v1.5.0+
Scripting Name: KissStartedEvent
Inherits from FaceTrackingEvent

This 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.

Lens Studio v1.0.0+
Scripting Name: LateUpdateEvent
Inherits from SceneEvent

This 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.

Lens Studio v1.0.0+
Scripting Name: ManipulateEndEvent
Inherits from SceneObjectEvent

This 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.

Lens Studio v1.0.0+
Scripting Name: ManipulateStartEvent
Inherits from SceneObjectEvent

This is the API for Lens Studio 4. For the latest API documentation, click here.

MouthClosedEvent

Triggered when the tracked face's mouth closes.

Lens Studio v1.5.0+
Scripting Name: MouthClosedEvent
Inherits from FaceTrackingEvent

This is the API for Lens Studio 4. For the latest API documentation, click here.

MouthOpenedEvent

Triggered when the tracked face's mouth opens.

Lens Studio v1.5.0+
Scripting Name: MouthOpenedEvent
Inherits from FaceTrackingEvent

This 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.

Lens Studio v4.0+
Scripting Name: OnAwakeEvent
Inherits from SceneEvent

This 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.

Lens Studio v4.13.0+
Scripting Name: OnDestroyEvent
Inherits from SceneEvent

This 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.

Lens Studio v4.22.0+
Scripting Name: OnDisableEvent
Inherits from SceneEvent

This 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.

Lens Studio v4.22.0+
Scripting Name: OnEnableEvent
Inherits from SceneEvent

This 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.

Lens Studio v4.0+
Scripting Name: OnStartEvent
Inherits from SceneEvent

This 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.).

Lens Studio v1.0.0+
Scripting Name: SceneObjectEvent
Inherits from SceneEvent

This is the API for Lens Studio 4. For the latest API documentation, click here.

SmileFinishedEvent

Triggered when a smile ends on the tracked face.

Lens Studio v1.5.0+
Scripting Name: SmileFinishedEvent
Inherits from FaceTrackingEvent

This is the API for Lens Studio 4. For the latest API documentation, click here.

SmileStartedEvent

Triggered when a smile begins on the tracked face.

Lens Studio v1.5.0+
Scripting Name: SmileStartedEvent
Inherits from FaceTrackingEvent

This 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.

Lens Studio v4.0+
Scripting Name: SnapImageCaptureEvent
Inherits from SceneEvent

This 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.

Lens Studio v4.0+
Scripting Name: SnapRecordStartEvent
Inherits from SceneEvent

This 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.

Lens Studio v4.0+
Scripting Name: SnapRecordStopEvent
Inherits from SceneEvent

This 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.

Lens Studio v1.0.0+
Scripting Name: TapEvent
Inherits from SceneObjectEvent

This is the API for Lens Studio 4. For the latest API documentation, click here.

TouchEndEvent

Triggered when a touch event ends.

Lens Studio v1.0.0+
Scripting Name: TouchEndEvent
Inherits from SceneObjectEvent

This 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.

Lens Studio v1.0.0+
Scripting Name: TouchMoveEvent
Inherits from SceneObjectEvent

This is the API for Lens Studio 4. For the latest API documentation, click here.

TouchStartEvent

Triggered when a touch event starts.

Lens Studio v1.0.0+
Scripting Name: TouchStartEvent
Inherits from SceneObjectEvent

This 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.

Lens Studio v4.0+
Scripting Name: TriggerPrimaryEvent
Inherits from SceneObjectEvent

This is the API for Lens Studio 4. For the latest API documentation, click here.

TurnOffEvent

Triggered when the lens turns off.

Lens Studio v1.0.0+
Scripting Name: TurnOffEvent
Inherits from SceneEvent

This 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.

Lens Studio v1.0.0+
Scripting Name: TurnOnEvent
Inherits from SceneEvent

This is the API for Lens Studio 4. For the latest API documentation, click here.

UpdateEvent

Triggered every frame.

Lens Studio v1.0.0+
Scripting Name: UpdateEvent
Inherits from SceneEvent

This 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.

Lens Studio v3.2+
Scripting Name: WorldTrackingMeshesAddedEvent
Inherits from SceneEvent

This 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.

Lens Studio v3.2+
Scripting Name: WorldTrackingMeshesRemovedEvent
Inherits from SceneEvent

This 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.

Lens Studio v3.2+
Scripting Name: WorldTrackingMeshesUpdatedEvent
Inherits from SceneEvent

This 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.

Lens Studio v3.4+
Scripting Name: WorldTrackingPlanesAddedEvent
Inherits from SceneEvent

This 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.

Lens Studio v3.4+
Scripting Name: WorldTrackingPlanesRemovedEvent
Inherits from SceneEvent

This 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.

Lens Studio v3.4+
Scripting Name: WorldTrackingPlanesUpdatedEvent
Inherits from SceneEvent

This 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).

Lens Studio v1.0.0+
Scripting Name: WorldTrackingResetEvent
Inherits from SceneEvent

This is the API for Lens Studio 4. For the latest API documentation, click here.

Was this page helpful?
Yes
No