Skip to main content

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.

DeprecatedKindDeprecated sinceReplacement
AnimatedTextureFileProvider.getDuration()MethodUse AnimatedTextureFileProvider.duration instead.
AnimatedTextureFileProvider.trackPropertyLens Scripting v278Capability no longer supported.
AnimationClassUse AnimationPlayer instead
AnimationClip.PostInfinityEnumNo replacement.
AnimationClip.RangeTypeEnumUse AnimationPlayer instead
AnimationLayerClassUse AnimationPlayer instead
AnimationMixerClassUse AnimationPlayer instead
AnimationMixerLayerClassNo replacement.
ARDepthTextureProviderType aliasLegacy name. Use WorldDepthTextureProvider instead.
AudioChainComponentType aliasLegacy name. Use AudioEffectComponent instead.
AudioPlayerType aliasLegacy name. Use AudioComponent instead.
BaseScriptComponent.apiPropertyThis property is no longer needed, you can use a reference to the ScriptComponent, including 'script', directly
BlendMode.AddLegacyEnum valueUse BlendMode.Add instead.
BlendMode.MultiplyLegacyEnum valueUse BlendMode.Multiply instead.
BlendShapesClassUse the blend shape related methods on RenderMeshVisual instead
BodyComponent.assetPropertyUse ColliderComponent#shape to set the shape to a LevelsetShape
BrowsWereJustFrownedEventType aliasLegacy name. Use BrowsLoweredEvent instead.
BrowsWereJustRaisedEventType aliasLegacy name. Use BrowsRaisedEvent instead.
BrowsWereJustReturnedToNormalEventType aliasLegacy name. Use BrowsReturnedToNormalEvent instead.
Camera.addRenderLayer()MethodUse the Camera#renderLayers property.
Camera.checkRenderLayer()MethodUse the Camera#renderLayers property.
Camera.enableClearColorPropertyUse ColorRenderTarget.clearColorOption instead.
Camera.getAllRenderLayers()MethodNo replacement.
Camera.isPhysicalPropertyUse Camera.devicePropertyUsage instead. Setting isPhysical = true is equivalent to devicePropertyUsage = DeviceProperty.All, and isPhysical = false is equivalent to devicePropertyUsage = DeviceProperty.None.
Camera.removeRenderLayer()MethodUse the Camera#renderLayers property.
Camera.supportedColorRenderTargetCountPropertyUse Camera.getSupportedColorRenderTargetCount instead.
Canvas.worldSpaceRectPropertyUse Canvas#layoutRect instead.
CapitilizationOverrideEnumLens Scripting v385Use CapitalizationOverride instead.
ClearDepthType aliasLegacy name. Use ClearScreen instead.
ClearScreenClassLens Scripting v316Use a PostEffectVisual with a custom Material instead
ClientInterfacePlayButtonTriggerEventType aliasLegacy name. Use ConnectedLensEnteredEvent instead.
ColliderComponent.assetPropertyUse ColliderComponent#shape to set the shape to a LevelsetShape
ColorspaceEnumNo replacement.
ConstraintType aliasLegacy name. Use Physics.Constraint instead.
DepthSetterClassLens Scripting v308Use a PostEffectVisual with a Material using WorldDepthTextureProvider instead
DeviceTracking.createTrackedWorldPoint()MethodLens Scripting v363No replacement; will be removed in a future release. See TrackedPoint.
DeviceTracking.hitTestWorldMesh()MethodLens Scripting v378Use 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()MethodLens Scripting v378Use 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.surfaceTrackingTargetPropertyNo replacement.
DialogModuleClassLens Scripting v366VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
ExternalImageProviderType aliasLegacy name. Use FaceImagePickerTextureProvider instead.
FaceImagePickerTextureProviderClassLens Scripting v279Use MediaPickerTextureProvider configured to select faces.
FaceRenderObjectProvider.getExpressionNames()MethodLens Scripting v306Use FaceRenderObjectProvider.onExpressionWeightsUpdate instead.
FaceRenderObjectProvider.getExpressionWeightByName()MethodLens Scripting v306Use FaceRenderObjectProvider.onExpressionWeightsUpdate instead.
FaceRenderObjectProvider.getExpressionWeights()MethodLens Scripting v306Use FaceRenderObjectProvider.onExpressionWeightsUpdate instead.
FaceSubVisualType aliasLegacy name. Use FaceMaskVisual instead.
FaceTextureProviderClassUse FaceCropTextureProvider instead
FilterType aliasLegacy name. Use Physics.Filter instead.
FixedConstraintType aliasLegacy name. Use Physics.FixedConstraint instead.
FloatAnimationTrackClassPrefer the newer AnimationPlayer APIs.
FloatAnimationTrack_KeyFramedType aliasLegacy name. Use FloatAnimationTrackKeyFramed instead.
FloatAnimationTrackKeyFramedClassPrefer the newer AnimationPlayer APIs.
FloatBezierAnimationTrack_KeyFramedType aliasLegacy name. Use FloatBezierAnimationTrackKeyFramed instead.
FloatBezierAnimationTrackKeyFramedClassPrefer the newer AnimationPlayer APIs.
GyroscopeClassUse DeviceTracking with Tracking Mode set to rotation. See the Tracking Modes guide for more information.
HairSimulationColliderAssetType aliasLegacy name. Use LevelsetColliderAsset instead.
HairSimulationColliderComponentType aliasLegacy name. Use ColliderComponent instead.
HairVisual.fallbackHairMaterialPropertyUse HairVisual#hairMaterial instead. The fallback material is no longer needed.
HairVisual.primaryHairMaterialPropertyUse HairVisual#hairMaterial instead.
Head.getFacesCount()MethodLens Scripting v306For 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()MethodLens Scripting v305Use Head#onLandmarksUpdate
Head.getLandmarkCount()MethodLens Scripting v305Use Head#onLandmarksUpdate
Head.getLandmarks()MethodLens Scripting v305Use Head#onLandmarksUpdate
HingeConstraintType aliasLegacy name. Use Physics.HingeConstraint instead.
HingeLimitSettingsType aliasLegacy name. Use Physics.HingeLimitSettings instead.
HingeMotorSettingsType aliasLegacy name. Use Physics.HingeMotorSettings instead.
HingeMotorTypeEnumLens Scripting v369Use Physics.HingeMotorType instead.
HintsType aliasLegacy name. Use HintsComponent instead.
ImagePickerTextureProviderClassLens Scripting v279Use MediaPickerTextureProvider instead
IntAnimationTrackClassPrefer the newer AnimationPlayer APIs.
InternetModule.makeResourceFromBlob()MethodLens Scripting v362Use DynamicResource.createWithBuffer(Blob.bytes()).
IntStepAnimationTrack_KeyFramedType aliasLegacy name. Use IntStepAnimationTrackKeyFramed instead.
IntStepAnimationTrackKeyFramedClassPrefer the newer AnimationPlayer APIs.
IntStepNoLerpAnimationTrack_KeyFramedType aliasLegacy name. Use IntStepNoLerpAnimationTrackKeyFramed instead.
IntStepNoLerpAnimationTrackKeyFramedClassPrefer the newer AnimationPlayer APIs.
KissJustFinishedEventType aliasLegacy name. Use KissFinishedEvent instead.
KissJustStartedEventType aliasLegacy name. Use KissStartedEvent instead.
LabelClassUse Text instead
LightSource.castsShadowsPropertyUse LightSource.shadowType instead.
LightSource.gaussianBlurSigmaPropertyUse LightSource#shadowBlurRadius instead.
MappingSession.onMappedPropertyUse the Promise returned by MappingSession.checkpoint instead.
mat4.extractEulerXYZ()MethodNo replacement.
mat4.fromEulerAnglesYXZ()MethodUse mat4.fromEulerAngles instead.
mat4.fromYawPitchRoll()MethodUse mat4.fromEulerAngles instead.
MediaPickerTextureProvider.faceRectPropertyUse MediaPickerTextureProvider#faceImageControl to access the face area.
MeshVisualType aliasLegacy name. Use RenderMeshVisual instead.
MotionController.Options.create()FunctionUse MotionControllerOptions#create
MouthWasJustClosedEventType aliasLegacy name. Use MouthClosedEvent instead.
MouthWasJustOpenedEventType aliasLegacy name. Use MouthOpenedEvent instead.
MultiplayerSession.deleteStoredValue()MethodNo replacement.
MultiplayerSession.getStoredValue()MethodUse Realtime Stores instead
MultiplayerSession.listStoredValues()MethodUse Realtime Stores instead
MultiplayerSession.setStoredValue()MethodUse Realtime Stores instead
ObjectTracker2DType aliasLegacy name. Use ObjectTracking instead.
OnLoopStartedEventType aliasLegacy name. Use OnTimeStartEvent instead.
Pass.writesColorPropertyUse Pass#colorMask instead.
PinToMeshComponent.preferedTrianglePropertyUse PinToMeshComponent.preferredTriangle instead.
PointConstraintType aliasLegacy name. Use Physics.PointConstraint instead.
ProceduralTextureProvider.create()MethodUse ProceduralTextureProvider#createWithFormat
quat.quatFromEuler()MethodUse quat.fromEulerAngles instead.
quat.toEuler()MethodUse Math.toEulerAngles instead.
QuaternionAnimationTrackClassNo replacement.
QuaternionAnimationTrack_KeyFramedType aliasLegacy name. Use QuaternionAnimationTrackKeyFramed instead.
QuaternionAnimationTrack_XYZEulerType aliasLegacy name. Use QuaternionAnimationTrackXYZEuler instead.
QuaternionAnimationTrackKeyFramedClassNo replacement.
QuaternionAnimationTrackXYZEulerClassNo replacement.
RemoteServiceHttpResponse.loadAsTexture()MethodNo replacement.
RemoteServiceModule.createWebSocket()MethodLens Scripting v308No replacement.
RemoteServiceModule.createWebView()MethodLens Scripting v308No replacement.
RemoteServiceModule.createWebViewOptions()MethodLens Scripting v313No replacement.
RemoteServiceModule.fetch()MethodLens Scripting v308No replacement.
RemoteServiceModule.makeResourceFromUrl()MethodNo replacement.
RemoteServiceModule.performHttpRequest()MethodNo replacement.
RenderMesh.extractIndices()MethodLens Scripting v336Use getIndexBuffer() instead.
RenderMesh.extractVerticesForAttribute()MethodLens Scripting v336Use getVertexDataForAttribute() instead.
RenderMeshVisual.blendShapePropertyUse of the BlendShapes Component is deprecated. The properties it previously contained are now found on RenderMeshVisual
RenderMeshVisual.setBlendShape()MethodNo replacement.
RenderTargetProvider.AntialiasingQuality.DefaultEnum valueLens Scripting v384Use AntialiasingQuality.X4 instead.
RenderTargetProvider.AntialiasingQuality.HighEnum valueLens Scripting v384Use AntialiasingQuality.X4 instead.
RenderTargetProvider.AntialiasingQuality.LowEnum valueLens Scripting v384Use AntialiasingQuality.X2 instead.
RenderTargetProvider.AntialiasingQuality.MediumEnum valueLens Scripting v384Use AntialiasingQuality.X4 instead.
RenderTargetProvider.AntialiasingQuality.UltraEnum valueLens Scripting v384Use AntialiasingQuality.X4 instead.
RenderTargetProvider.clearColorEnabledPropertyUse RenderTargetProvider#clearColorOption instead.
RetouchVisual.lookupTexturePropertyThis property is no longer supported.
RetouchVisual.maskTexturePropertyThis property is no longer supported.
RetouchVisual.softSkinRadiusPropertyCapability is no longer supported.
SafeSnapchatUserType aliasLegacy name. Use SafeUser instead.
ScanModule.Contexts.DogsVariableScanning for dog breeds is no longer supported.
SceneObject.getAllComponents()MethodNo replacement.
SceneObject.getComponentByIndex()MethodNo replacement.
SceneObject.getComponentCount()MethodNo replacement.
SceneObject.getFirstComponent()MethodUse SceneObject#getComponent Use SceneObject#getComponent
SceneObject.getRenderLayer()MethodUse SceneObject#layer instead
SceneObject.isEnabledInHiearchyPropertyUse SceneObject.isEnabledInHierarchy instead (note the corrected spelling).
SceneObject.setRenderLayer()MethodUse SceneObject#layer instead
ScriptType aliasLegacy name. Use ScriptComponent instead.
ScriptComponent.apiPropertyThis property is no longer needed, you can use a reference to the ScriptComponent, including 'script', directly
SegmentationTextureProvider.getMaskPercentage()MethodUse SegmentationTextureProvider#onMaskPercentageUpdated
SmileJustFinishedEventType aliasLegacy name. Use SmileFinishedEvent instead.
SmileJustStartedEventType aliasLegacy name. Use SmileStartedEvent instead.
SnapchatUserBirthdayType aliasLegacy name. Use UserBirthday instead.
SplineComponentClassLens Scripting v316No replacement.
SpriteAlignerClassLens Scripting v316No replacement.
SpriteVisualClassUse Image component instead.
SpriteVisualV2Type aliasLegacy name. Use Image instead.
SurfaceTrackingResetEventType aliasLegacy name. Use WorldTrackingResetEvent instead.
Text.capitilizationOverridePropertyLens Scripting v385Use Text#capitalizationOverride instead.
Text.worldSpaceRectPropertyUse Text#layoutRect instead.
Text3D.capitilizationOverridePropertyLens Scripting v385Use Text3D#capitalizationOverride instead.
Text3D.worldSpaceRectPropertyUse Text3D#layoutRect instead.
TextToSpeech.OptionsClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
TextToSpeech.PhonemeInfoClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
TextToSpeech.WordInfoClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
TextToSpeechModuleClassLens Scripting v348VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
Texture.getColorspace()MethodLens Scripting v315No replacement.
TextureStretchModeEnumUse StretchMode instead.
TextVisualType aliasLegacy name. Use Label instead.
TouchType aliasLegacy name. Use InteractionComponent instead.
TouchComponentType aliasLegacy name. Use InteractionComponent instead.
TrackedPointClassLens Scripting v363No replacement; will be removed in a future release.
TrackedPointComponentClassLens Scripting v363TrackedPoint is deprecated; will be removed in a future release.
TurnOnEventClassUse OnStartEvent instead.
vec2.randomDirection()MethodUse Math.randomUnitVector or Math.setRandomUnitVector instead.
Vec2AnimationTrackClassUse AnimationPlayer instead.
Vec2AnimationTrack_KeyFramedType aliasLegacy name. Use Vec2AnimationTrackKeyFramed instead.
Vec2AnimationTrackKeyFramedClassUse AnimationPlayer instead.
vec3.randomDirection()MethodUse Math.randomUnitVector or Math.setRandomUnitVector instead.
Vec3AnimationTrackClassUse AnimationPlayer instead.
Vec3AnimationTrack_KeyFramedType aliasLegacy name. Use Vec3AnimationTrackKeyFramed instead.
Vec3AnimationTrack_XYZType aliasLegacy name. Use Vec3AnimationTrackXYZ instead.
Vec3AnimationTrackKeyFramedClassUse AnimationPlayer instead.
Vec3AnimationTrackXYZClassUse AnimationPlayer instead.
Vec4AnimationTrackClassUse AnimationPlayer instead.
Vec4AnimationTrack_KeyFramedType aliasLegacy name. Use Vec4AnimationTrackKeyFramed instead.
Vec4AnimationTrackKeyFramedClassUse AnimationPlayer instead.
VideoTextureProvider.getCurrentPlayCount()MethodNo replacement.
VideoTextureProvider.getStatus()MethodUse VideoTextureProvider#status
VideoTextureProvider.setOnFinish()MethodUse VideoTextureProvider.onPlaybackDone instead
VideoTextureProvider.setOnReady()MethodUse VideoTextureProvider.onPlaybackReady instead
VoiceML.AdditionalParamClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.BaseNlpModelClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.BaseNlpResponseClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.KeywordModelGroupClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.ListeningErrorEventArgsClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.ListeningOptionsClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.ListeningUpdateEventArgsClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.NlpCommandResponseClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.NlpIntentModelClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.NlpIntentResponseClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.NlpIntentsModelOptions.create()FunctionNo replacement.
VoiceML.NlpKeywordModelClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.NlpKeywordModelOptions.create()FunctionNo replacement.
VoiceML.NlpKeywordResponseClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.NlpResponseStatusClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.PostProcessingActionClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.PostProcessingActionResponseClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.PostProcessingActionResponseStatusClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.QnaActionClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.QnaResponseClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceML.SpeechContextClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceMLModuleClassVoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceMLModule.AnswerStatusCodesEnumLens Scripting v337VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceMLModule.NlpResponsesStatusCodesEnumLens Scripting v337VoiceML capabilities are no longer supported. For Spectacles see options on ASRModule.
VoiceMLModule.SpeechRecognizer.DefaultVariableNo replacement.
WeightedMode.BothEnum valueUse Easing, Slope, or Absolute modes instead.
WeightedMode.LeftEnum valueUse Easing, Slope, or Absolute modes instead.
WeightedMode.NoneEnum valueNo replacement.
WeightedMode.RightEnum valueUse Easing, Slope, or Absolute modes instead.
WorldDepthTextureProvider.sampleDepthAtPoint()MethodPrefer the newer DepthModule APIs.
WorldTrackingType aliasLegacy name. Use DeviceTracking instead.