Skip to main content

Script Objects

Script Objects represent script data.

Anchor

An object containing the position of an object relative to a LocationAsset.

Lens Studio v4.19.0+
Scripting Name: Anchor
Inherits from ScriptObject

AnimationClip

Animation Clip is what an Animation Player uses to manage playback for a specific animation. It defines that animation by referencing an Animation Asset and providing start and end points, playback speed and direction, and blending information.

Lens Studio v5.0.14+
Scripting Name: AnimationClip
Inherits from ScriptObject

AnimationCurve

A curve that contains a set of keyframes and can evaluate values at specific timestamps.

Lens Studio v5.0.1+
Scripting Name: AnimationCurve
Inherits from ScriptObject

AnimationKeyFrame

A keyframe with time and respective value. Could be added to Animation Curve.

Lens Studio v5.0.1+
Scripting Name: AnimationKeyFrame
Inherits from ScriptObject

[DEPRECATED] AnimationMixerLayer

Controls animation playback for a single animation layer. See also: AnimationMixer.

Lens Studio v1.0.0+
Scripting Name: AnimationMixerLayer
Inherits from ScriptObject

AnimationPlayerOnEventArgs

Args used for AnimationPlayer's event, which is triggered every time the animation playback passes the given time in the event.

Lens Studio v5.0.20+
Scripting Name: AnimationPlayerOnEventArgs
Inherits from ScriptObject

AnimationPropertyEventRegistration

The event registration returned by AnimationAsset's createEvent.

Lens Studio v5.0.10+
Scripting Name: AnimationPropertyEventRegistration
Inherits from ScriptObject

AnimationPropertyLayer

A layer containing different properties. Examples include position, rotation, scale or any other arbitrary properties a user would like to add and sample from.

Lens Studio v5.0.10+
Scripting Name: AnimationPropertyLayer
Inherits from ScriptObject

BackgroundSettings

Settings for rendering the background on a Text component. Accessible through the Text component's backgroundSettings property.

Lens Studio v2.1+
Scripting Name: BackgroundSettings
Inherits from ScriptObject

BaseMultiplayerSessionOptions

Base class for MultiplayerSession options. This class is not used directly - use ConnectedLensSessionOptions instead.

Lens Studio v4.0+
Scripting Name: BaseMultiplayerSessionOptions
Inherits from ScriptObject

BasePlaceholder

Base class for Input and Output Placeholders used by MLComponent.

Lens Studio v3.0+
Scripting Name: BasePlaceholder
Inherits from ScriptObject

BasicTransform

Provides basic information about a transformation. See also: DeviceTracking

Lens Studio v2.2+
Scripting Name: BasicTransform
Inherits from ScriptObject

Bitmoji2DOptions

The options used with requestBitmoji2DResource.

Lens Studio v5.0.10+
Scripting Name: Bitmoji2DOptions
Inherits from ScriptObject

Bitmoji2DResource

The DynamicResource of a 2D Bitmoji which can be loaded with RemoteMediaModule.

Lens Studio v5.0.10+
Scripting Name: Bitmoji2DResource
Inherits from DynamicResource

Bitmoji3DOptions

The options used with requestBitmoji3DResource

Lens Studio v5.0.10+
Scripting Name: Bitmoji3DOptions
Inherits from ScriptObject

Bitmoji3DResource

Provides information about the current user's 3D Bitmoji avatar to be downloaded via the RemoteMediaModule.

Lens Studio v4.22.0+
Scripting Name: Bitmoji3DResource
Inherits from DynamicResource

BoxShape

A box collision shape.

Lens Studio v4.4+
Scripting Name: BoxShape
Inherits from Shape

Camera.BaseRenderTarget

The base class from which ColorRenderTarget and DepthStencilRenderTarget are derived from

Lens Studio v3.4+
Scripting Name: BaseRenderTarget
Inherits from ScriptObject
Outer Classes: Camera

Camera.ColorRenderTarget

Color based RenderTarget.

Lens Studio v3.4+
Scripting Name: ColorRenderTarget
Outer Classes: Camera

Camera.DepthStencilRenderTarget

This class inherits from the BaseRenderTarget class. BaseRenderTarget class is not available for creation and is used like the base class for DepthStencilRenderTarget class to provide access to targetTexture, inputTexture and maskTexture properties.

Lens Studio v4.1+
Scripting Name: DepthStencilRenderTarget
Outer Classes: Camera

CapsuleShape

A capsule collision shape. Also known as a capped cylinder.

Lens Studio v4.4+
Scripting Name: CapsuleShape
Inherits from Shape

CloudStorageListOptions

Options associated with the listValues method call.

Lens Studio v4.19.0+
Scripting Name: CloudStorageListOptions
Inherits from ScriptObject

CloudStorageOptions

Used to configure Cloud Storage Module with various options. Note: if session scoped storage is required, this option must be provided.

Lens Studio v4.19.0+
Scripting Name: CloudStorageOptions
Inherits from ScriptObject

CloudStorageReadOptions

Options associated with the getValue/deleteValue methods for Cloud Storage.

Lens Studio v4.19.0+
Scripting Name: CloudStorageReadOptions
Inherits from ScriptObject

CloudStorageWriteOptions

Options associated with the setValue method for Cloud Storage.

Lens Studio v4.19.0+
Scripting Name: CloudStorageWriteOptions
Inherits from ScriptObject

CloudStore

An instance of Cloud Storage that can store data in a multiplayer experience.

Lens Studio v4.19.0+
Scripting Name: CloudStore
Inherits from ScriptObject

Collision

A state generated for ColliderComponent collision events.

Lens Studio v4.10.0+
Scripting Name: Physics.Collision
Inherits from ScriptObject

CollisionEnterEventArgs

Args used for ColliderComponent.onCollisionEnter, which is triggered when a collision begins.

Lens Studio v4.10.0+
Scripting Name: Physics.CollisionEnterEventArgs
Inherits from ScriptObject

CollisionExitEventArgs

Args used for ColliderComponent.onCollisionExit, which is triggered when a collision ends.

Lens Studio v4.10.0+
Scripting Name: Physics.CollisionExitEventArgs
Inherits from ScriptObject

CollisionStayEventArgs

Args used for ColliderComponent.onCollisionStay, which is triggered every frame while a collision continues.

Lens Studio v4.10.0+
Scripting Name: Physics.CollisionStayEventArgs
Inherits from ScriptObject

ConeShape

A cone collision shape.

Lens Studio v4.13.0+
Scripting Name: ConeShape
Inherits from Shape

ConnectedLensModule.ConnectionInfo

Information that is bootstrapped to the user who just connected to the session.

Lens Studio v4.25.0+
Scripting Name: ConnectionInfo
Inherits from ScriptObject
Outer Classes: ConnectedLensModule

ConnectedLensModule.HostUpdateInfo

Information about the host update.

Lens Studio v4.31.0+
Scripting Name: HostUpdateInfo
Inherits from ScriptObject
Outer Classes: ConnectedLensModule

ConnectedLensModule.RealtimeStoreCreationInfo

Provides extra context about a RealtimeStore's creation.

Lens Studio v4.28.0+
Scripting Name: RealtimeStoreCreationInfo
Inherits from ScriptObject
Outer Classes: ConnectedLensModule

ConnectedLensModule.RealtimeStoreDeleteInfo

Gives information about the Realtime Store delete operation.

Lens Studio v4.25.0+
Scripting Name: RealtimeStoreDeleteInfo
Inherits from ScriptObject
Outer Classes: ConnectedLensModule

ConnectedLensModule.RealtimeStoreKeyRemovalInfo

Provides information about a key being removed from a RealtimeStore.

Lens Studio v4.28.0+
Scripting Name: RealtimeStoreKeyRemovalInfo
Inherits from ScriptObject
Outer Classes: ConnectedLensModule

ConnectedLensModule.RealtimeStoreOwnershipUpdateInfo

Provides information about a RealtimeStore's ownership being updated.

Lens Studio v4.28.0+
Scripting Name: RealtimeStoreOwnershipUpdateInfo
Inherits from ScriptObject
Outer Classes: ConnectedLensModule

ConnectedLensModule.RealtimeStoreUpdateInfo

Gives information about the Realtime Store update operation.

Lens Studio v4.25.0+
Scripting Name: RealtimeStoreUpdateInfo
Inherits from ScriptObject
Outer Classes: ConnectedLensModule

ConnectedLensModule.UserInfo

Provides information about a user in a Connected Lens session.

Lens Studio v4.0+
Scripting Name: UserInfo
Inherits from ScriptObject
Outer Classes: ConnectedLensModule

ConnectedLensSessionOptions

Settings for configuring a Connected Lens session.

Lens Studio v4.0+
Scripting Name: ConnectedLensSessionOptions

Constraint

Constraints body motion in configurable ways, for simulating physical objects such as joints and hinges.

Lens Studio v4.10.0+
Scripting Name: Physics.Constraint
Inherits from ScriptObject

Contact

Contact point between two colliding objects. See also: ColliderComponent, CollisionEnterEventArgs, CollisionExitEventArgs, CollisionStayEventArgs.

Lens Studio v4.10.0+
Scripting Name: Physics.Contact
Inherits from ScriptObject

CylinderShape

A cylinder collision shape.

Lens Studio v4.13.0+
Scripting Name: CylinderShape
Inherits from Shape

Delay

Creates a buffer for the audio data.

Lens Studio v3.4+
Scripting Name: Delay
Inherits from ScriptObject

DelayBuilder

Builder class for the Delay.

Lens Studio v3.4+
Scripting Name: DelayBuilder
Inherits from ScriptObject

Delta

Local estimate of the derivative of the input data along the selected axis. Outputs the derivative of the input features along the window.

Lens Studio v3.4+
Scripting Name: Delta
Inherits from ScriptObject

DeltaBuilder

Builder class for Delta.

Lens Studio v3.4+
Scripting Name: DeltaBuilder
Inherits from ScriptObject

DeviceCamera

Provides information about the device's camera.

Lens Studio v4.0+
Scripting Name: DeviceCamera
Inherits from ScriptObject

DeviceInfoSystem

Provides information about the device running the Lens. Accessible through global.deviceInfoSystem.

Lens Studio v4.0+
Scripting Name: DeviceInfoSystem
Inherits from ScriptObject

Dialog.Answer

Provides answer information in response to DialogModule.askQuestions().

Lens Studio v4.28.0+
Scripting Name: Answer
Inherits from ScriptObject

DirectMultiplayerSessionOptions

Lens Studio v4.0+
Scripting Name: DirectMultiplayerSessionOptions

DirectivityEffect

An Audio Component effect that simulates sound attenuation based on the orientation of the transform relative to the AudioListenerComponent.

Lens Studio v4.0+
Scripting Name: DirectivityEffect
Inherits from ScriptObject

DistanceEffect

An audio effect that simulates sound attenuation based on the distance between the Audio and the AudioListenerComponent.

Lens Studio v4.0+
Scripting Name: DistanceEffect
Inherits from ScriptObject

DropshadowSettings

Used in Text's dropShadowSettings property. Configures how dropshadow will appear on a Text component.

Lens Studio v2.0.0+
Scripting Name: DropshadowSettings
Inherits from ScriptObject

DynamicResource

A resource that is resolved at runtime.

Lens Studio v4.22.0+
Scripting Name: DynamicResource
Inherits from ScriptObject

EventRegistration

Lens Studio v4.0+
Scripting Name: EventRegistration
Inherits from ScriptObject

Filter

Intersection filter settings. Unifies settings for world probes and collider overlap tests. See also: ColliderComponent, Physics.

Lens Studio v4.10.0+
Scripting Name: Physics.Filter
Inherits from ScriptObject

FixedConstraint

Fully constrain rotation and translation. See also: ConstraintComponent.

Lens Studio v4.10.0+
Scripting Name: Physics.FixedConstraint
Inherits from Constraint

FocusEndEventArgs

Arguments used with the InteractionComponent.onFocusEnd event.

Lens Studio v4.0+
Scripting Name: FocusEndEventArgs
Inherits from ScriptObject

FocusStartEventArgs

Arguments used with the InteractionComponent.onFocusStart event.

Lens Studio v4.0+
Scripting Name: FocusStartEventArgs
Inherits from ScriptObject

GeneralDataStore

Class for storing and retrieving data based on keys. Used by PersistentStorageSystem. For more information, see the Persistent Storage guide.

Lens Studio v2.0.0+
Scripting Name: GeneralDataStore
Inherits from ScriptObject

GeoPosition

The location of the device.

Lens Studio v5.0.0+
Scripting Name: GeoPosition
Inherits from ScriptObject

GltfSettings

Settings for importing a glTF Asset. Use this with GltfAsset component's tryInstantiateWithSetting method.

Lens Studio v4.31.0+
Scripting Name: GltfSettings
Inherits from ScriptObject

HandSpecificData

Provides additional data for the tracked hand. You can figure out whether the tracked hand is the left hand by accessing the isLeft property [true/false], as well as the probability of this data through the isLeftProbability property [0-1].

Lens Studio v4.0+
Scripting Name: HandSpecificData
Inherits from ObjectSpecificData

HapticFeedbackSystem

Triggers haptic feedback on the device. (iOS Devices only)

Lens Studio v5.0.2+
Scripting Name: HapticFeedbackSystem
Inherits from ScriptObject

HingeConstraint

Constraints translation and a single axis of rotation. See also: ConstraintComponent.

Lens Studio v4.10.0+
Scripting Name: Physics.HingeConstraint
Inherits from Constraint

InputBuilder

Builds InputPlaceHolders for MLComponent.

Lens Studio v3.0+
Scripting Name: InputBuilder
Inherits from ScriptObject

InputPlaceholder

Controls input data for a neural network used by an MLComponent. For more information, see the MLComponent Scripting guide.

Lens Studio v3.0+
Scripting Name: InputPlaceholder
Inherits from BasePlaceholder

Leaderboard

A leaderboard which can contain scores and information about participating users. Accessible through the LeaderboardModule asset.

Lens Studio v5.0.20+
Scripting Name: Leaderboard
Inherits from ScriptObject

Leaderboard.CreateOptions

The options for the leaderboard to be made.

Lens Studio v5.0.20+
Scripting Name: CreateOptions
Inherits from ScriptObject
Outer Classes: Leaderboard

Leaderboard.RetrievalOptions

Describes the context for the leaderboard to be requested.

Lens Studio v5.0.20+
Scripting Name: RetrievalOptions
Inherits from ScriptObject
Outer Classes: Leaderboard

Leaderboard.UserRecord

Information for a user who submitted a score to the leaderboard.

Lens Studio v5.0.20+
Scripting Name: UserRecord
Inherits from ScriptObject
Outer Classes: Leaderboard

LevelsetShape

A levelset collision shape. A levelset is an asset that is generated to approximate a mesh.

Lens Studio v4.4+
Scripting Name: LevelsetShape
Inherits from Shape

LocalizationSystem

Helps convert data types to localized string representations. Accessible through global.localizationSystem.

Note that formatted or localized strings may appear differently to users depending on their region. The example results given here are representative of a user in the United States, but may appear differently for users in other regions.

Lens Studio v2.0.0+
Scripting Name: LocalizationSystem
Inherits from ScriptObject

LocationCloudStorageOptions

Used to configure LocationCloudStorage module with various options.

Lens Studio v4.28.0+
Scripting Name: LocationCloudStorageOptions
Inherits from ScriptObject

LocationCloudStore

Instance of location cloud store which has a similar interface as cloud store.

Lens Studio v4.28.0+
Scripting Name: LocationCloudStore
Inherits from ScriptObject

LocationService

The LocationService allows the user to provide their location to Lens applications if they so desire. For privacy reasons, the user is asked for permission to report location information.

Spectacles: Users should be logged in and paired with Snapchat account and also location permission should be enabled. Users are expected to be connected to the internet to make use of aided information for indoor locations and challenging scenarios.

Lens Studio v5.0.0+
Scripting Name: LocationService
Inherits from ScriptObject

MFCC

Mel-frequency cepstral coefficients.

Lens Studio v3.4+
Scripting Name: MFCC
Inherits from ScriptObject

MFCCBuilder

Builder class for the MFCC (Mel Frequency Cepstral Co-efficients).

Lens Studio v3.4+
Scripting Name: MFCCBuilder
Inherits from ScriptObject

ManipulateEndEventArgs

Arguments used with the ManipulateComponent.onManipulateEnd event.

Lens Studio v4.0+
Scripting Name: ManipulateEndEventArgs
Inherits from ScriptObject

ManipulateStartEventArgs

Arguments used with the ManipulateComponent.onManipulateStart event.

Lens Studio v4.0+
Scripting Name: ManipulateStartEventArgs
Inherits from ScriptObject

MappingOptions

Used with MappingSession to describe the session to be created.

Lens Studio v5.0.0+
Scripting Name: MappingOptions
Inherits from ScriptObject

MappingSession

Used with the LocatedAtComponent to map the current physical location.

Lens Studio v5.0.0+
Scripting Name: MappingSession
Inherits from ScriptObject

MelSpectrogram

Computes a mel scale spectrogram - a spectrogram where the frequencies are converted to the mel scale.

Lens Studio v3.4+
Scripting Name: MelSpectrogram
Inherits from ScriptObject

MelSpectrogramBuilder

A builder class for MelSpectrogram.

Lens Studio v3.4+
Scripting Name: MelSpectrogramBuilder
Inherits from ScriptObject

MeshShape

Allows meshes to be used as collision shapes, for ColliderComponent and BodyComponent.

Lens Studio v4.28.0+
Scripting Name: MeshShape
Inherits from Shape

MultiplayerSession

An instance of a Connected Lens session among a group of participants who were successfully invited into the experience.

Lens Studio v4.0+
Scripting Name: MultiplayerSession
Inherits from ScriptObject

NoiseReduction

Lens Studio v4.12.0+
Scripting Name: NoiseReduction
Inherits from ScriptObject

NoiseReductionBuilder

Lens Studio v4.12.0+
Scripting Name: NoiseReductionBuilder
Inherits from ScriptObject

ObjectSpecificData

Provides additional data for the tracked object. For example, with hand tracking, you can figure out whether the tracked hand is the left hand by accessing the isLeft property [true/false], as well as the probability of this data through the isLeftProbability property [0-1].

Lens Studio v4.0+
Scripting Name: ObjectSpecificData
Inherits from ScriptObject
Child Classes: HandSpecificData

OutlineSettings

Used in Text's outlineSettings property. Configures how text outlining will appear on a Text component.

Lens Studio v2.0.0+
Scripting Name: OutlineSettings
Inherits from ScriptObject

OutputBuilder

Builds OutputPlaceholders for MLComponent.

Lens Studio v3.0+
Scripting Name: OutputBuilder
Inherits from ScriptObject

OutputPlaceholder

Provides output data from the neural network used by an MLComponent. For more information, see the MLComponent Scripting guide.

Lens Studio v3.0+
Scripting Name: OutputPlaceholder
Inherits from BasePlaceholder

Overlap

Exposes state generated for ColliderComponent overlap events. See also: ColliderComponent, OverlapEnterEventArgs, OverlapExitEventArgs, OverlapStayEventArgs.

Lens Studio v4.10.0+
Scripting Name: Physics.Overlap
Inherits from ScriptObject

OverlapEnterEventArgs

Args used for ColliderComponent.onOverlapEnter, which is triggered when the collider begins overlapping another object. Typically used for volume triggers.

Lens Studio v4.10.0+
Scripting Name: Physics.OverlapEnterEventArgs
Inherits from ScriptObject

OverlapExitEventArgs

Args used for ColliderComponent.onOverlapEnd, which is triggered when the collider stops overlapping another object. Typically used for volume triggers.

Lens Studio v4.10.0+
Scripting Name: Physics.OverlapExitEventArgs
Inherits from ScriptObject

OverlapStayEventArgs

Args used for ColliderComponent.onOverlapStay, which is triggered every frame while the collider continues overlapping another object. Typically used for volume triggers.

Lens Studio v4.10.0+
Scripting Name: Physics.OverlapStayEventArgs
Inherits from ScriptObject

Pass

Controls how a mesh will get rendered. Each Pass acts as an interface for the shader it's associated with. Any properties on a Pass's shader will automatically become properties on that Pass. For example, if the shader defines a variable named baseColor, a script would be able to access that property as material.mainPass.baseColor.

Lens Studio v1.0.0+
Scripting Name: Asset.Pass
Inherits from ScriptObject

PassWrapper

Similar to Pass, except used by VFX Assets.

Lens Studio v4.0+
Scripting Name: PassWrapper
Inherits from ScriptObject

PassWrappers

Allows for retrieval of a collection of Pass objects used by VFXAsset

Lens Studio v4.0+
Scripting Name: PassWrappers
Inherits from ScriptObject

PersistentStorageSystem

Allows data to be stored and retrieved between Lens sessions. In other words, data can be saved on device and loaded back in the next time the Lens is opened. Can be accessed with global.persistentStorageSystem.

See the Persistent Storage guide for more information.

Lens Studio v2.0.0+
Scripting Name: PersistentStorageSystem
Inherits from ScriptObject

PitchShifter

Lens Studio v4.12.0+
Scripting Name: PitchShifter
Inherits from ScriptObject

PitchShifterBuilder

Lens Studio v4.12.0+
Scripting Name: PitchShifterBuilder
Inherits from ScriptObject

PointCloud

Represents 3D locations of stationary features in the environment. The resulting cloud of points provides a sparse description of the 3D environment.

Lens Studio v4.4+
Scripting Name: PointCloud
Inherits from ScriptObject

PointConstraint

A type of constraint that only allows rotation. See also: ConstraintComponent.

Lens Studio v4.10.0+
Scripting Name: Physics.PointConstraint
Inherits from Constraint

PositionEffect

An Audio Component effect that allows the Lens to simulate sound based on the direction of the Audio Listener relative to the Audio Component.

Lens Studio v4.0+
Scripting Name: PositionEffect
Inherits from ScriptObject

Probe

Performs collision tests (such as ray casts) in one or more world. See Physics.createGlobalProbe(), Physics.createRootProbe(), WorldComponent.createProbe().

Lens Studio v4.10.0+
Scripting Name: Physics.Probe
Inherits from ScriptObject

Properties

Lens Studio v4.0+
Scripting Name: Properties
Inherits from ScriptObject

PropertyOnEventArgs

Lens Studio v5.0.10+
Scripting Name: PropertyOnEventArgs
Inherits from ScriptObject

RayCastHit

Hit results of a ray-cast provided to script. See Probe.

Lens Studio v4.10.0+
Scripting Name: Physics.RayCastHit
Inherits from ScriptObject

RealtimeStoreCreateOptions

The options for the realtime store.

Lens Studio v4.19.0+
Scripting Name: RealtimeStoreCreateOptions
Inherits from ScriptObject

Rect

An axis aligned rectangle. Used by anchors and offsets in ScreenTransform to represent screen boundaries. Rect can only store finite numbers in the range Number.MIN_VALUE to Number.MAX_VALUE.

Lens Studio v2.0.0+
Scripting Name: Rect
Inherits from ScriptObject

RemoteApiRequest

Lens Studio v4.12.0+
Scripting Name: RemoteApiRequest
Inherits from ScriptObject

RemoteApiResponse

Lens Studio v4.12.0+
Scripting Name: RemoteApiResponse
Inherits from ScriptObject

RotatedRect

Lens Studio v4.13.0+
Scripting Name: RotatedRect
Inherits from ScriptObject

RotationOptions

Used with DeviceTracking.rotationOptions to change settings for Rotation tracking mode.

Lens Studio v1.6.0+
Scripting Name: RotationOptions
Inherits from ScriptObject

Sampler

Lens Studio v4.53.0+
Scripting Name: Sampler
Inherits from ScriptObject

SamplerBuilder

Class for building Sampler.

Lens Studio v4.49.0+
Scripting Name: SamplerBuilder
Inherits from ScriptObject

SamplerWrapper

An accessor for Pass.samplers when using PassWrappers

Lens Studio v4.0+
Scripting Name: SamplerWrapper
Inherits from ScriptObject

SamplerWrappers

Lens Studio v4.0+
Scripting Name: SamplerWrappers
Inherits from ScriptObject

SceneObject

An object in the scene hierarchy, containing a Transform and possibly Components. A script can access the SceneObject holding it through the method script.getSceneObject().

Lens Studio v1.0.0+
Scripting Name: SceneObject
Inherits from SerializableWithUID

ScriptObject

Base class for objects representing Script data.

Lens Studio v1.0.0+
Scripting Name: ScriptObject
Child Classes: Anchor, AnimationClip, AnimationCurve, AnimationKeyFrame, AnimationMixerLayer, AnimationPlayerOnEventArgs, AnimationPropertyEventRegistration, AnimationPropertyLayer, BackgroundSettings, BaseMultiplayerSessionOptions, BasePlaceholder, BasicTransform, Bitmoji2DOptions, Bitmoji3DOptions, Camera.BaseRenderTarget, CloudStorageListOptions, CloudStorageOptions, CloudStorageReadOptions, CloudStorageWriteOptions, CloudStore, Collision, CollisionEnterEventArgs, CollisionExitEventArgs, CollisionStayEventArgs, ConnectedLensModule.ConnectionInfo, ConnectedLensModule.HostUpdateInfo, ConnectedLensModule.RealtimeStoreCreationInfo, ConnectedLensModule.RealtimeStoreDeleteInfo, ConnectedLensModule.RealtimeStoreKeyRemovalInfo, ConnectedLensModule.RealtimeStoreOwnershipUpdateInfo, ConnectedLensModule.RealtimeStoreUpdateInfo, ConnectedLensModule.UserInfo, Constraint, Contact, Delay, DelayBuilder, Delta, DeltaBuilder, DeviceCamera, DeviceInfoSystem, Dialog.Answer, DirectivityEffect, DistanceEffect, DropshadowSettings, DynamicResource, EventRegistration, Filter, FocusEndEventArgs, FocusStartEventArgs, GeneralDataStore, GeoPosition, GltfSettings, HapticFeedbackSystem, IEventParameters, InputBuilder, Leaderboard, Leaderboard.CreateOptions, Leaderboard.RetrievalOptions, Leaderboard.UserRecord, LocalizationSystem, LocationCloudStorageOptions, LocationCloudStore, LocationService, ManipulateEndEventArgs, ManipulateStartEventArgs, MappingOptions, MappingSession, MelSpectrogram, MelSpectrogramBuilder, MFCC, MFCCBuilder, MultiplayerSession, NoiseReduction, NoiseReductionBuilder, ObjectSpecificData, OutlineSettings, OutputBuilder, Overlap, OverlapEnterEventArgs, OverlapExitEventArgs, OverlapStayEventArgs, Pass, PassWrapper, PassWrappers, PersistentStorageSystem, PitchShifter, PitchShifterBuilder, PointCloud, PositionEffect, Probe, Properties, PropertyOnEventArgs, Provider, RayCastHit, RealtimeStoreCreateOptions, Rect, RemoteApiRequest, RemoteApiResponse, RotatedRect, RotationOptions, Sampler, SamplerBuilder, SamplerWrapper, SamplerWrappers, ScriptScene, SelectEndEventArgs, SelectStartEventArgs, SerializableWithUID, Shape, SnapchatUser, SpatialAudio, Spectrogram, SpectrogramBuilder, StencilState, StorageOptions, SurfaceOptions, TapEventArgs, TextFill, TextInputSystem, TextToSpeech.Options, TextToSpeech.PhonemeInfo, TextToSpeech.WordInfo, TouchDataProvider, TouchEndEventArgs, TouchMoveEventArgs, TouchStartEventArgs, TrackedMesh, TrackedMeshHistogramResult, TrackedMeshHitTestResult, TrackedPlane, TrackedPoint, Transform, Transformer, TransformerBuilder, TriangleHit, TriggerPrimaryEventArgs, UserContextSystem, VertexSimulationSettings, VoiceML.AdditionalParam, VoiceML.BaseNlpModel, VoiceML.BaseNlpResponse, VoiceML.KeywordModelGroup, VoiceML.ListeningErrorEventArgs, VoiceML.ListeningOptions, VoiceML.ListeningUpdateEventArgs, VoiceML.NlpResponseStatus, VoiceML.PostProcessingAction, VoiceML.PostProcessingActionResponse, VoiceML.PostProcessingActionResponseStatus, VoiceML.SpeechContext, WorldOptions, WorldQuery, WorldTrackingCapabilities

ScriptScene

Represents the Lens scene. Accessible through global.scene.

Lens Studio v1.0.0+
Scripting Name: ScriptScene
Inherits from ScriptObject

SelectEndEventArgs

Arguments used with the InteractionComponent.onSelectEnd event.

Lens Studio v4.0+
Scripting Name: SelectEndEventArgs
Inherits from ScriptObject

SelectStartEventArgs

Arguments used with the InteractionComponent.onSelectStart event.

Lens Studio v4.0+
Scripting Name: SelectStartEventArgs
Inherits from ScriptObject

SerializableWithUID

Low-level data class.

Lens Studio v1.0.0+
Scripting Name: SerializableWithUID
Inherits from ScriptObject
Child Classes: Asset, Component, SceneObject

Shape

Base type for collision shapes.

Lens Studio v4.4+
Scripting Name: Shape
Inherits from ScriptObject

SnapchatUser

Represents a Snapchat user in order to pass to other APIs or to retrieve certain details about the user like display name.

Lens Studio v5.0.10+
Scripting Name: SnapchatUser
Inherits from ScriptObject

SpatialAudio

Lens Studio v4.0+
Scripting Name: SpatialAudio
Inherits from ScriptObject

Spectrogram

Representation the signal strength over time at various frequencies present in a particular waveform. Created by applying Fast Fourier Transform (FFT) on the overlapping segments of the audio data.

Lens Studio v3.4+
Scripting Name: Spectrogram
Inherits from ScriptObject

SpectrogramBuilder

The builder class for Spectrogram.

Lens Studio v3.4+
Scripting Name: SpectrogramBuilder
Inherits from ScriptObject

SphereShape

A sphere collision shape.

Lens Studio v4.4+
Scripting Name: SphereShape
Inherits from Shape

StencilState

The stencil test state for Pass.

Lens Studio v4.1+
Scripting Name: StencilState
Inherits from ScriptObject

StorageOptions

Settings for saving values in a MultiplayerSession.

Lens Studio v4.0+
Scripting Name: StorageOptions
Inherits from ScriptObject

SurfaceOptions

Used with DeviceTracking.surfaceOptions to change settings for Surface tracking mode.

Lens Studio v1.6.0+
Scripting Name: SurfaceOptions
Inherits from ScriptObject

TapEventArgs

Arguments used with the InteractionComponent.onTap event.

Lens Studio v4.0+
Scripting Name: TapEventArgs
Inherits from ScriptObject

TextFill

Fill settings used by several text related classes. Used in Text's textFill property, DropshadowSettings' fill property, and OutlineSettings' fill property.

Lens Studio v2.0.0+
Scripting Name: TextFill
Inherits from ScriptObject

TextInputSystem

Provides access to the device's input system. Accessible through global.textInputSystem.

Lens Studio v4.13.0+
Scripting Name: TextInputSystem
Inherits from ScriptObject

TextToSpeech.Options

Provides the configuration for the Text to Speech Module. It is used to control the language of the generated voice, the voice’s style and pace.

Lens Studio v4.4+
Scripting Name: Options
Inherits from ScriptObject
Outer Classes: TextToSpeech

TextToSpeech.PhonemeInfo

Provides a map of what phoneme is said at what time in the synthesized speech.

Lens Studio v4.13.0+
Scripting Name: PhonemeInfo
Inherits from ScriptObject
Outer Classes: TextToSpeech

TextToSpeech.WordInfo

Parameter returned in the onTTSCompleteHandler callback providing timing details for word pronunciation.

Lens Studio v4.4+
Scripting Name: WordInfo
Inherits from ScriptObject
Outer Classes: TextToSpeech

TouchDataProvider

This provider is returned by global.touchSystem and allows your lens to handle any touches on the screen, and optionally let certain touch types to pass through (let Snapchat handle the touch).

Possible TouchType exception values:

  • "TouchTypeNone"
  • "TouchTypeTouch"
  • "TouchTypeTap"
  • "TouchTypeDoubleTap"
  • "TouchTypeScale"
  • "TouchTypePan"
  • "TouchTypeSwipe"

Lens Studio v1.0.0+
Scripting Name: TouchDataProvider
Inherits from ScriptObject

TouchEndEventArgs

Lens Studio v4.0+
Scripting Name: TouchEndEventArgs
Inherits from ScriptObject

TouchMoveEventArgs

Arguments used with the InteractionComponent.onTouchMove event.

Lens Studio v4.0+
Scripting Name: TouchMoveEventArgs
Inherits from ScriptObject

TouchStartEventArgs

Arguments used with the InteractionComponent.onTouchStart event.

Lens Studio v4.0+
Scripting Name: TouchStartEventArgs
Inherits from ScriptObject

TrackedMesh

Represents a mesh generated by world tracking. Only available when world mesh tracking is supported and enabled.

Lens Studio v3.2+
Scripting Name: TrackedMesh
Inherits from ScriptObject

TrackedMeshHistogramResult

Provides histogram information about tracked world mesh faces in a given area. Returned by DeviceTracking.calculateWorldMeshHistogram().

Lens Studio v3.2+
Scripting Name: TrackedMeshHistogramResult
Inherits from ScriptObject

TrackedMeshHitTestResult

Provides information about a TrackedMesh surface hit during a raycast. Is returned in an array when calling DeviceTracking.hitTestWorldMesh() or DeviceTracking.raycastWorldMesh().

Lens Studio v3.2+
Scripting Name: TrackedMeshHitTestResult
Inherits from ScriptObject

TrackedPlane

A representation for plane detected by native tracking. Can be used with TrackedPoint.

Lens Studio v3.4+
Scripting Name: TrackedPlane
Inherits from ScriptObject

TrackedPoint

A point on the real world not attached to any detected plane.

Lens Studio v3.4+
Scripting Name: TrackedPoint
Inherits from ScriptObject

Transform

Controls the position, rotation, and scale of a SceneObject. Every SceneObject automatically has a Transform attached.

Lens Studio v1.0.0+
Scripting Name: Transform
Inherits from ScriptObject

Transformer

Applies additional transform processing on data for InputPlaceholders and OutputPlaceholders used with MLComponent. For more information, see the MLComponent Overview.

Lens Studio v3.0+
Scripting Name: Transformer
Inherits from ScriptObject

TransformerBuilder

Builds Transformer objects for MLComponent.

Lens Studio v3.0+
Scripting Name: TransformerBuilder
Inherits from ScriptObject

TriangleHit

Triangle hit information, available when a ray cast intersects a collision mesh.

Lens Studio v4.31.0+
Scripting Name: Physics.TriangleHit
Inherits from ScriptObject

TriggerPrimaryEventArgs

Arguments used with the InteractionComponent.onTriggerPrimary event.

Lens Studio v4.0+
Scripting Name: TriggerPrimaryEventArgs
Inherits from ScriptObject

UserContextSystem

Provides information about the user such as display name, birthday, and current weather. Accessible through global.userContextSystem.

All callbacks will execute as soon as the requested information is available. In some rare cases, the requested information may be completely unavailable, and the callback will never occur.

Note that formatted or localized strings may appear differently to users depending on their region.

Lens Studio v2.0.0+
Scripting Name: UserContextSystem
Inherits from ScriptObject

VertexSimulationSettings

Provides settings for vertex physics in the ClothVisual component.

Lens Studio v4.0+
Scripting Name: VertexSimulationSettings
Inherits from ScriptObject

VoiceML.AdditionalParam

Additional parameters are used to provide additional data for NlpModels and NlpResponses.

Lens Studio v4.4+
Scripting Name: AdditionalParam
Inherits from ScriptObject
Outer Classes: VoiceML

VoiceML.BaseNlpModel

NlpModels are used to provide the VoiceML NLP engine information about how the transcript of the input audio should be processed. BaseNlpModels is the abstract base class all NlpModels (NlpKeywordModel, NlpIntentModel) inherit from.

You can specify multiple NlpModels to process the same audio, all of their results will be returned in ListeningUpdateEventArgs

Lens Studio v4.4+
Scripting Name: BaseNlpModel
Inherits from ScriptObject
Outer Classes: VoiceML

VoiceML.BaseNlpResponse

The abstract base class all NlpResponses inherit from. NlpResponses are used as the result from the VoiceML NLP engine with information after processing the transcript of the input audio.

Lens Studio v4.4+
Scripting Name: BaseNlpResponse
Inherits from ScriptObject
Outer Classes: VoiceML

VoiceML.KeywordModelGroup

An NLP model used to detect keywords in the transcript of the input audio. For example, you can have keyword detection which will trigger every time the word "red" is said, and another trigger for the word "yellow".

Lens Studio v4.4+
Scripting Name: KeywordModelGroup
Inherits from ScriptObject
Outer Classes: VoiceML

VoiceML.ListeningErrorEventArgs

ListeningErrorEventArgs object returns in onListeningError callback. It contains the error code and description of the error.

Lens Studio v4.4+
Scripting Name: ListeningErrorEventArgs
Inherits from ScriptObject
Outer Classes: VoiceML

VoiceML.ListeningOptions

Provides the configuration for the audio input processing output. This can either include NLP processing using the (nlpModels) or directly retrieving the transcription. speechContext provides the ability to further improve the transcription accuracy given an assumed context.

Lens Studio v4.4+
Scripting Name: ListeningOptions
Inherits from ScriptObject
Outer Classes: VoiceML

VoiceML.ListeningUpdateEventArgs

The parameter when the callback registered on from VoiceMLModule.onListeningUpdate is called. This is to mark the input audio transcription (and possibly NlpModels as a result) was updated.

Lens Studio v4.4+
Scripting Name: ListeningUpdateEventArgs
Inherits from ScriptObject
Outer Classes: VoiceML

VoiceML.NlpCommandResponse

May be returned when enableSystemCommands() API is used. The NlpCommandResponse contains the results of the servers' NLP command model classification on the last sentence and indicates that a predetermined system command was detected. Current supported commands:

  • “Take a Snap”: takes a snapshot.
  • “Start Recording”: starts a video recording if not already started.
  • "Stop Recording”: stops an ongoing video recording, if applicable.

Lens Studio v4.7+
Scripting Name: NlpCommandResponse
Outer Classes: VoiceML

VoiceML.NlpIntentModel

Specifies which NLP Intent model should run to classify the transcription of the input audio. NLP Intent classification meant to extract the meaning of a sentence rather than detecting certain keywords. Multiple intent models can be used on the same transcription, and will run only on complete sentences (isFinalTranscription = True). Supported intent models: VOICE_ENABLED_UI.

Lens Studio v4.4+
Scripting Name: NlpIntentModel
Inherits from VoiceML.BaseNlpModel
Outer Classes: VoiceML

VoiceML.NlpIntentResponse

Returned when NlpIntentModel was specificed in the ListeningOptions, it contains the results of the NLP Intent model classification on the last sentence. NlpIntentResponse will only run on complete sentences (isFinalTranscription = true).

Lens Studio v4.4+
Scripting Name: NlpIntentResponse
Outer Classes: VoiceML

VoiceML.NlpKeywordModel

Used to detect usage of certain keywords from the input audio.

Keyword detection (whose results will be returned in NlpKeywordResponse in the ListeningUpdateEventArgs) can happen in the mid input sentence (and in such case the the isFinalTranscription=false) or can happen at the end of the sentence (isFinalTranscription=true). Mid sentence detection have closer proximity to the time the word was spoken, but might be less accurate.

Lens Studio v4.4+
Scripting Name: NlpKeywordModel
Inherits from VoiceML.BaseNlpModel
Outer Classes: VoiceML

VoiceML.NlpKeywordResponse

NlpKeywordResponse will be returned if KeywordModel has been supplied as an input model in the ListeningOptions. The keyword model allows detection of keywords (or short phrases) in an input audio.

Lens Studio v4.4+
Scripting Name: NlpKeywordResponse
Outer Classes: VoiceML

VoiceML.NlpResponseStatus

The NLP Response Status indicates wether the NLP was successful in parsing the sentence.

Lens Studio v4.4+
Scripting Name: NlpResponseStatus
Inherits from ScriptObject
Outer Classes: VoiceML

VoiceML.PostProcessingAction

The PostProcessingAction is the base class for QnaAction and other post processing actions that need to processed after the transcription phase.

Lens Studio v4.28.0+
Scripting Name: PostProcessingAction
Inherits from ScriptObject
Outer Classes: VoiceML
Child Classes: VoiceML.QnaAction

VoiceML.PostProcessingActionResponse

The PostProcessingActionResponse is the base class for QnaActionRespose and other post processing actions responses. It holds the id and status properties for all deriving objects.

Lens Studio v4.28.0+
Scripting Name: PostProcessingActionResponse
Inherits from ScriptObject
Outer Classes: VoiceML
Child Classes: VoiceML.QnaResponse

VoiceML.PostProcessingActionResponseStatus

Lens Studio v4.28.0+
Scripting Name: PostProcessingActionResponseStatus
Inherits from ScriptObject
Outer Classes: VoiceML

VoiceML.QnaAction

Lens Studio v4.28.0+
Scripting Name: QnaAction
Inherits from PostProcessingAction
Outer Classes: VoiceML

VoiceML.QnaResponse

Lens Studio v4.28.0+
Scripting Name: QnaResponse
Outer Classes: VoiceML

VoiceML.SpeechContext

Speech context is used in cases where specific words are expected from the users, the transcription accuracy of these words can be improved, by straightening their likelihood in context. The strength is scaled 1-10 (10 being the strongest increase) the default value is 5.

Lens Studio v4.4+
Scripting Name: SpeechContext
Inherits from ScriptObject
Outer Classes: VoiceML

WorldOptions

Holds settings for world mesh tracking in DeviceTracking component. Accessible through DeviceTracking.worldOptions.

Lens Studio v3.2+
Scripting Name: WorldOptions
Inherits from ScriptObject

[DEPRECATED] WorldQuery

Scripting Name: ScriptObject.WorldQuery
Inherits from ScriptObject

WorldTrackingCapabilities

Provides information about whether certain world tracking features are supported by the device.

Lens Studio v3.2+
Scripting Name: WorldTrackingCapabilities
Inherits from ScriptObject
Was this page helpful?
Yes
No