Deprecated Lens Scripting APIs
Lens Scripting APIs that are deprecated, and what to use instead.
Lens Studio 5.8.0 and later warn you when a project calls a deprecated API, creates a deprecated component, or uses a deprecated asset type. Move to the replacement listed here.
Deprecated APIs are not listed anywhere else in this reference. 210 are deprecated in Lens API 387. A deprecated class or namespace is listed once and takes its members with it.
| Deprecated | Kind | Deprecated since | Replacement |
|---|---|---|---|
AnimatedTextureFileProvider.getDuration() | Method | Use AnimatedTextureFileProvider.duration instead. | |
AnimatedTextureFileProvider.track | Property | Lens Scripting v278 | Capability no longer supported. |
Animation | Class | Use AnimationPlayer instead | |
AnimationClip.PostInfinity | Enum | No replacement. | |
AnimationClip.RangeType | Enum | Use AnimationPlayer instead | |
AnimationLayer | Class | Use AnimationPlayer instead | |
AnimationMixer | Class | Use AnimationPlayer instead | |
AnimationMixerLayer | Class | No replacement. | |
ARDepthTextureProvider | Type alias | Legacy name. Use WorldDepthTextureProvider instead. | |
AudioChainComponent | Type alias | Legacy name. Use AudioEffectComponent instead. | |
AudioPlayer | Type alias | Legacy name. Use AudioComponent instead. | |
BaseScriptComponent.api | Property | This property is no longer needed, you can use a reference to the ScriptComponent, including 'script', directly | |
BlendMode.AddLegacy | Enum value | Use BlendMode.Add instead. | |
BlendMode.MultiplyLegacy | Enum value | Use BlendMode.Multiply instead. | |
BlendShapes | Class | Use the blend shape related methods on RenderMeshVisual instead | |
BodyComponent.asset | Property | Use ColliderComponent#shape to set the shape to a LevelsetShape | |
BrowsWereJustFrownedEvent | Type alias | Legacy name. Use BrowsLoweredEvent instead. | |
BrowsWereJustRaisedEvent | Type alias | Legacy name. Use BrowsRaisedEvent instead. | |
BrowsWereJustReturnedToNormalEvent | Type alias | Legacy name. Use BrowsReturnedToNormalEvent instead. | |
Camera.addRenderLayer() | Method | Use the Camera#renderLayers property. | |
Camera.checkRenderLayer() | Method | Use the Camera#renderLayers property. | |
Camera.enableClearColor | Property | Use ColorRenderTarget.clearColorOption instead. | |
Camera.getAllRenderLayers() | Method | No replacement. | |
Camera.isPhysical | Property | Use Camera.devicePropertyUsage instead. Setting isPhysical = true is equivalent to devicePropertyUsage = DeviceProperty.All, and isPhysical = false is equivalent to devicePropertyUsage = DeviceProperty.None. | |
Camera.removeRenderLayer() | Method | Use the Camera#renderLayers property. | |
Camera.supportedColorRenderTargetCount | Property | Use Camera.getSupportedColorRenderTargetCount instead. | |
Canvas.worldSpaceRect | Property | Use Canvas#layoutRect instead. | |
CapitilizationOverride | Enum | Lens Scripting v385 | Use CapitalizationOverride instead. |
ClearDepth | Type alias | Legacy name. Use ClearScreen instead. | |
ClearScreen | Class | Lens Scripting v316 | Use a PostEffectVisual with a custom Material instead |
ClientInterfacePlayButtonTriggerEvent | Type alias | Legacy name. Use ConnectedLensEnteredEvent instead. | |
ColliderComponent.asset | Property | Use ColliderComponent#shape to set the shape to a LevelsetShape | |
Colorspace | Enum | No replacement. | |
Constraint | Type alias | Legacy name. Use Physics.Constraint instead. | |
DepthSetter | Class | Lens Scripting v308 | Use a PostEffectVisual with a Material using WorldDepthTextureProvider instead |
DeviceTracking.createTrackedWorldPoint() | Method | Lens Scripting v363 | No replacement; will be removed in a future release. See TrackedPoint. |
DeviceTracking.hitTestWorldMesh() | Method | Lens Scripting v378 | Use WorldRaycast#hitTestWorldMesh instead. Performs a raycast against world meshes from a screen position. The ray starts at the camera's near plane and extends through the camera's far plane at the given screen coordinates. |
DeviceTracking.raycastWorldMesh() | Method | Lens Scripting v378 | Use WorldRaycast#raycastWorldMesh instead. Performs a raycast against world meshes along a ray from world position from to world position to. Returns detailed intersection information for each mesh surface hit by the ray. |
DeviceTracking.surfaceTrackingTarget | Property | No replacement. | |
DialogModule | Class | Lens Scripting v366 | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. |
ExternalImageProvider | Type alias | Legacy name. Use FaceImagePickerTextureProvider instead. | |
FaceImagePickerTextureProvider | Class | Lens Scripting v279 | Use MediaPickerTextureProvider configured to select faces. |
FaceRenderObjectProvider.getExpressionNames() | Method | Lens Scripting v306 | Use FaceRenderObjectProvider.onExpressionWeightsUpdate instead. |
FaceRenderObjectProvider.getExpressionWeightByName() | Method | Lens Scripting v306 | Use FaceRenderObjectProvider.onExpressionWeightsUpdate instead. |
FaceRenderObjectProvider.getExpressionWeights() | Method | Lens Scripting v306 | Use FaceRenderObjectProvider.onExpressionWeightsUpdate instead. |
FaceSubVisual | Type alias | Legacy name. Use FaceMaskVisual instead. | |
FaceTextureProvider | Class | Use FaceCropTextureProvider instead | |
Filter | Type alias | Legacy name. Use Physics.Filter instead. | |
FixedConstraint | Type alias | Legacy name. Use Physics.FixedConstraint instead. | |
FloatAnimationTrack | Class | Prefer the newer AnimationPlayer APIs. | |
FloatAnimationTrack_KeyFramed | Type alias | Legacy name. Use FloatAnimationTrackKeyFramed instead. | |
FloatAnimationTrackKeyFramed | Class | Prefer the newer AnimationPlayer APIs. | |
FloatBezierAnimationTrack_KeyFramed | Type alias | Legacy name. Use FloatBezierAnimationTrackKeyFramed instead. | |
FloatBezierAnimationTrackKeyFramed | Class | Prefer the newer AnimationPlayer APIs. | |
Gyroscope | Class | Use DeviceTracking with Tracking Mode set to rotation. See the Tracking Modes guide for more information. | |
HairSimulationColliderAsset | Type alias | Legacy name. Use LevelsetColliderAsset instead. | |
HairSimulationColliderComponent | Type alias | Legacy name. Use ColliderComponent instead. | |
HairVisual.fallbackHairMaterial | Property | Use HairVisual#hairMaterial instead. The fallback material is no longer needed. | |
HairVisual.primaryHairMaterial | Property | Use HairVisual#hairMaterial instead. | |
Head.getFacesCount() | Method | Lens Scripting v306 | For finding out whether any faces are tracked you should use SceneObject.isEnabledInHierarchy on the object containing the Head component instead. You can check for a given count by assigning face index on the Head Component. |
Head.getLandmark() | Method | Lens Scripting v305 | Use Head#onLandmarksUpdate |
Head.getLandmarkCount() | Method | Lens Scripting v305 | Use Head#onLandmarksUpdate |
Head.getLandmarks() | Method | Lens Scripting v305 | Use Head#onLandmarksUpdate |
HingeConstraint | Type alias | Legacy name. Use Physics.HingeConstraint instead. | |
HingeLimitSettings | Type alias | Legacy name. Use Physics.HingeLimitSettings instead. | |
HingeMotorSettings | Type alias | Legacy name. Use Physics.HingeMotorSettings instead. | |
HingeMotorType | Enum | Lens Scripting v369 | Use Physics.HingeMotorType instead. |
Hints | Type alias | Legacy name. Use HintsComponent instead. | |
ImagePickerTextureProvider | Class | Lens Scripting v279 | Use MediaPickerTextureProvider instead |
IntAnimationTrack | Class | Prefer the newer AnimationPlayer APIs. | |
InternetModule.makeResourceFromBlob() | Method | Lens Scripting v362 | Use DynamicResource.createWithBuffer(Blob.bytes()). |
IntStepAnimationTrack_KeyFramed | Type alias | Legacy name. Use IntStepAnimationTrackKeyFramed instead. | |
IntStepAnimationTrackKeyFramed | Class | Prefer the newer AnimationPlayer APIs. | |
IntStepNoLerpAnimationTrack_KeyFramed | Type alias | Legacy name. Use IntStepNoLerpAnimationTrackKeyFramed instead. | |
IntStepNoLerpAnimationTrackKeyFramed | Class | Prefer the newer AnimationPlayer APIs. | |
KissJustFinishedEvent | Type alias | Legacy name. Use KissFinishedEvent instead. | |
KissJustStartedEvent | Type alias | Legacy name. Use KissStartedEvent instead. | |
Label | Class | Use Text instead | |
LightSource.castsShadows | Property | Use LightSource.shadowType instead. | |
LightSource.gaussianBlurSigma | Property | Use LightSource#shadowBlurRadius instead. | |
MappingSession.onMapped | Property | Use the Promise returned by MappingSession.checkpoint instead. | |
mat4.extractEulerXYZ() | Method | No replacement. | |
mat4.fromEulerAnglesYXZ() | Method | Use mat4.fromEulerAngles instead. | |
mat4.fromYawPitchRoll() | Method | Use mat4.fromEulerAngles instead. | |
MediaPickerTextureProvider.faceRect | Property | Use MediaPickerTextureProvider#faceImageControl to access the face area. | |
MeshVisual | Type alias | Legacy name. Use RenderMeshVisual instead. | |
MotionController.Options.create() | Function | Use MotionControllerOptions#create | |
MouthWasJustClosedEvent | Type alias | Legacy name. Use MouthClosedEvent instead. | |
MouthWasJustOpenedEvent | Type alias | Legacy name. Use MouthOpenedEvent instead. | |
MultiplayerSession.deleteStoredValue() | Method | No replacement. | |
MultiplayerSession.getStoredValue() | Method | Use Realtime Stores instead | |
MultiplayerSession.listStoredValues() | Method | Use Realtime Stores instead | |
MultiplayerSession.setStoredValue() | Method | Use Realtime Stores instead | |
ObjectTracker2D | Type alias | Legacy name. Use ObjectTracking instead. | |
OnLoopStartedEvent | Type alias | Legacy name. Use OnTimeStartEvent instead. | |
Pass.writesColor | Property | Use Pass#colorMask instead. | |
PinToMeshComponent.preferedTriangle | Property | Use PinToMeshComponent.preferredTriangle instead. | |
PointConstraint | Type alias | Legacy name. Use Physics.PointConstraint instead. | |
ProceduralTextureProvider.create() | Method | Use ProceduralTextureProvider#createWithFormat | |
quat.quatFromEuler() | Method | Use quat.fromEulerAngles instead. | |
quat.toEuler() | Method | Use Math.toEulerAngles instead. | |
QuaternionAnimationTrack | Class | No replacement. | |
QuaternionAnimationTrack_KeyFramed | Type alias | Legacy name. Use QuaternionAnimationTrackKeyFramed instead. | |
QuaternionAnimationTrack_XYZEuler | Type alias | Legacy name. Use QuaternionAnimationTrackXYZEuler instead. | |
QuaternionAnimationTrackKeyFramed | Class | No replacement. | |
QuaternionAnimationTrackXYZEuler | Class | No replacement. | |
RemoteServiceHttpResponse.loadAsTexture() | Method | No replacement. | |
RemoteServiceModule.createWebSocket() | Method | Lens Scripting v308 | No replacement. |
RemoteServiceModule.createWebView() | Method | Lens Scripting v308 | No replacement. |
RemoteServiceModule.createWebViewOptions() | Method | Lens Scripting v313 | No replacement. |
RemoteServiceModule.fetch() | Method | Lens Scripting v308 | No replacement. |
RemoteServiceModule.makeResourceFromUrl() | Method | No replacement. | |
RemoteServiceModule.performHttpRequest() | Method | No replacement. | |
RenderMesh.extractIndices() | Method | Lens Scripting v336 | Use getIndexBuffer() instead. |
RenderMesh.extractVerticesForAttribute() | Method | Lens Scripting v336 | Use getVertexDataForAttribute() instead. |
RenderMeshVisual.blendShape | Property | Use of the BlendShapes Component is deprecated. The properties it previously contained are now found on RenderMeshVisual | |
RenderMeshVisual.setBlendShape() | Method | No replacement. | |
RenderTargetProvider.AntialiasingQuality.Default | Enum value | Lens Scripting v384 | Use AntialiasingQuality.X4 instead. |
RenderTargetProvider.AntialiasingQuality.High | Enum value | Lens Scripting v384 | Use AntialiasingQuality.X4 instead. |
RenderTargetProvider.AntialiasingQuality.Low | Enum value | Lens Scripting v384 | Use AntialiasingQuality.X2 instead. |
RenderTargetProvider.AntialiasingQuality.Medium | Enum value | Lens Scripting v384 | Use AntialiasingQuality.X4 instead. |
RenderTargetProvider.AntialiasingQuality.Ultra | Enum value | Lens Scripting v384 | Use AntialiasingQuality.X4 instead. |
RenderTargetProvider.clearColorEnabled | Property | Use RenderTargetProvider#clearColorOption instead. | |
RetouchVisual.lookupTexture | Property | This property is no longer supported. | |
RetouchVisual.maskTexture | Property | This property is no longer supported. | |
RetouchVisual.softSkinRadius | Property | Capability is no longer supported. | |
SafeSnapchatUser | Type alias | Legacy name. Use SafeUser instead. | |
ScanModule.Contexts.Dogs | Variable | Scanning for dog breeds is no longer supported. | |
SceneObject.getAllComponents() | Method | No replacement. | |
SceneObject.getComponentByIndex() | Method | No replacement. | |
SceneObject.getComponentCount() | Method | No replacement. | |
SceneObject.getFirstComponent() | Method | Use SceneObject#getComponent Use SceneObject#getComponent | |
SceneObject.getRenderLayer() | Method | Use SceneObject#layer instead | |
SceneObject.isEnabledInHiearchy | Property | Use SceneObject.isEnabledInHierarchy instead (note the corrected spelling). | |
SceneObject.setRenderLayer() | Method | Use SceneObject#layer instead | |
Script | Type alias | Legacy name. Use ScriptComponent instead. | |
ScriptComponent.api | Property | This property is no longer needed, you can use a reference to the ScriptComponent, including 'script', directly | |
SegmentationTextureProvider.getMaskPercentage() | Method | Use SegmentationTextureProvider#onMaskPercentageUpdated | |
SmileJustFinishedEvent | Type alias | Legacy name. Use SmileFinishedEvent instead. | |
SmileJustStartedEvent | Type alias | Legacy name. Use SmileStartedEvent instead. | |
SnapchatUserBirthday | Type alias | Legacy name. Use UserBirthday instead. | |
SplineComponent | Class | Lens Scripting v316 | No replacement. |
SpriteAligner | Class | Lens Scripting v316 | No replacement. |
SpriteVisual | Class | Use Image component instead. | |
SpriteVisualV2 | Type alias | Legacy name. Use Image instead. | |
SurfaceTrackingResetEvent | Type alias | Legacy name. Use WorldTrackingResetEvent instead. | |
Text.capitilizationOverride | Property | Lens Scripting v385 | Use Text#capitalizationOverride instead. |
Text.worldSpaceRect | Property | Use Text#layoutRect instead. | |
Text3D.capitilizationOverride | Property | Lens Scripting v385 | Use Text3D#capitalizationOverride instead. |
Text3D.worldSpaceRect | Property | Use Text3D#layoutRect instead. | |
TextToSpeech.Options | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
TextToSpeech.PhonemeInfo | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
TextToSpeech.WordInfo | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
TextToSpeechModule | Class | Lens Scripting v348 | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. |
Texture.getColorspace() | Method | Lens Scripting v315 | No replacement. |
TextureStretchMode | Enum | Use StretchMode instead. | |
TextVisual | Type alias | Legacy name. Use Label instead. | |
Touch | Type alias | Legacy name. Use InteractionComponent instead. | |
TouchComponent | Type alias | Legacy name. Use InteractionComponent instead. | |
TrackedPoint | Class | Lens Scripting v363 | No replacement; will be removed in a future release. |
TrackedPointComponent | Class | Lens Scripting v363 | TrackedPoint is deprecated; will be removed in a future release. |
TurnOnEvent | Class | Use OnStartEvent instead. | |
vec2.randomDirection() | Method | Use Math.randomUnitVector or Math.setRandomUnitVector instead. | |
Vec2AnimationTrack | Class | Use AnimationPlayer instead. | |
Vec2AnimationTrack_KeyFramed | Type alias | Legacy name. Use Vec2AnimationTrackKeyFramed instead. | |
Vec2AnimationTrackKeyFramed | Class | Use AnimationPlayer instead. | |
vec3.randomDirection() | Method | Use Math.randomUnitVector or Math.setRandomUnitVector instead. | |
Vec3AnimationTrack | Class | Use AnimationPlayer instead. | |
Vec3AnimationTrack_KeyFramed | Type alias | Legacy name. Use Vec3AnimationTrackKeyFramed instead. | |
Vec3AnimationTrack_XYZ | Type alias | Legacy name. Use Vec3AnimationTrackXYZ instead. | |
Vec3AnimationTrackKeyFramed | Class | Use AnimationPlayer instead. | |
Vec3AnimationTrackXYZ | Class | Use AnimationPlayer instead. | |
Vec4AnimationTrack | Class | Use AnimationPlayer instead. | |
Vec4AnimationTrack_KeyFramed | Type alias | Legacy name. Use Vec4AnimationTrackKeyFramed instead. | |
Vec4AnimationTrackKeyFramed | Class | Use AnimationPlayer instead. | |
VideoTextureProvider.getCurrentPlayCount() | Method | No replacement. | |
VideoTextureProvider.getStatus() | Method | Use VideoTextureProvider#status | |
VideoTextureProvider.setOnFinish() | Method | Use VideoTextureProvider.onPlaybackDone instead | |
VideoTextureProvider.setOnReady() | Method | Use VideoTextureProvider.onPlaybackReady instead | |
VoiceML.AdditionalParam | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.BaseNlpModel | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.BaseNlpResponse | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.KeywordModelGroup | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.ListeningErrorEventArgs | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.ListeningOptions | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.ListeningUpdateEventArgs | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.NlpCommandResponse | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.NlpIntentModel | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.NlpIntentResponse | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.NlpIntentsModelOptions.create() | Function | No replacement. | |
VoiceML.NlpKeywordModel | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.NlpKeywordModelOptions.create() | Function | No replacement. | |
VoiceML.NlpKeywordResponse | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.NlpResponseStatus | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.PostProcessingAction | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.PostProcessingActionResponse | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.PostProcessingActionResponseStatus | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.QnaAction | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.QnaResponse | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceML.SpeechContext | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceMLModule | Class | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. | |
VoiceMLModule.AnswerStatusCodes | Enum | Lens Scripting v337 | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. |
VoiceMLModule.NlpResponsesStatusCodes | Enum | Lens Scripting v337 | VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule. |
VoiceMLModule.SpeechRecognizer.Default | Variable | No replacement. | |
WeightedMode.Both | Enum value | Use Easing, Slope, or Absolute modes instead. | |
WeightedMode.Left | Enum value | Use Easing, Slope, or Absolute modes instead. | |
WeightedMode.None | Enum value | No replacement. | |
WeightedMode.Right | Enum value | Use Easing, Slope, or Absolute modes instead. | |
WorldDepthTextureProvider.sampleDepthAtPoint() | Method | Prefer the newer DepthModule APIs. | |
WorldTracking | Type alias | Legacy name. Use DeviceTracking instead. |