Assets
Every asset type a plugin can create or edit, materials and passes, animation clips, Gaussian splats, and the Asset Library.
Commonly used
AssetRepresents an imported asset with cached file and metadata.MaterialMaterial asset defining rendering passes and their properties.FileTextureAn asset for textures.ScriptAssetScript asset that can be attached to scene objects, containing inputs, attachments, and metadata.ObjectPrefabReusable object template that can be instantiated in scenes.LensStudio:AssetUtils.js
Guides
Common TasksBelow are some common tasks you might need to do while creating your plugins.Building PluginsYou can build your own plugins to support your own workflow, and even share it to help others.Chat Tools DevelopmentThis guide provides instructions for adding Chat Tools to Lens Studio.Best PracticesYou can use the Yeoman Generator to accelerate your plugin development process.
All APIs in this topic
Create assets with assetManager.createNativeAsset('Material', name, destination) and import modules with import * as Ui from 'LensStudio:Ui'. APIs listed by a short name are in Editor.Assets: AnimationAsset is Editor.Assets.AnimationAsset.
Components, assets, and modules
| API | Description |
|---|---|
| AnimationAsset | Represents an animation asset with playback timing information. |
| Asset | Represents an imported asset with cached file and metadata. |
| AudioTrackAsset | |
| BodyTracking3DAsset | 3D body tracking asset with optional hand tracking support. |
| CustomAsset | An instance of a custom asset type defined by an @asset script. |
| CustomCodeNodeAsset | Asset representing a custom code node in a visual graph. |
| DeviceCameraTexture | A native asset that provides the texture from the camera feed. |
| FaceCropTexture | A native asset that provides a cropped region of the input texture, calculated based on face position. |
| FaceMesh | A native asset that provides a 3D mesh of the user's face. |
| FileMesh | An asset for 3D meshes. |
| FileTexture | An asset for textures. |
| FileTexture2DArray | A 2D texture array asset loaded from file containing multiple 2D texture layers. |
| FileTexture3D | 3D texture asset imported from an external file. |
| FileTextureCubemap | Cubemap texture asset with per-face texture information. |
| Font | Font asset for text rendering. |
| FontCollection | An ordered collection of Font and FontFamily assets, allowing a Text component to access multiple fonts and font families. |
| FontFamily | Groups multiple Font assets into a single family, mapping each to a style (weight + italic). |
| GaussianSplattingAsset | Asset containing Gaussian splats for use with GaussianSplattingVisual. |
| HairDataAsset | Native asset providing data for hair rendering. |
| HandMesh | A render mesh that follows a tracked hand. |
| HandTracking3DAsset | 3D hand tracking asset for hand pose and gesture recognition. |
| ImageMarker | A LensScripting.MarkerAsset for use with Editor.Components.MarkerTrackingComponent |
| JavaScriptAsset | A script asset that is written in JavaScript. |
| JsonAsset | Asset wrapping JSON data. |
| LensStudio:AssetInstantiator | Module providing asset instantiation capabilities for Lens Studio plugins. |
| LensStudio:AssetLibrary | |
| LensStudio:AssetUtils.js | |
| LicensedAudioTrack | Licensed audio track asset with metadata and runtime source paths. |
| LocationAsset | Asset representing a named location with an identifier and type. |
| LocationMesh | A native asset that provides data for LensScripting.LocationAsset. |
| MarkdownAsset | Native asset for markdown content. |
| MarkerAsset | Base asset for marker tracking with configurable height. |
| Material | Material asset defining rendering passes and their properties. |
| MLAsset | Machine learning model asset. |
| NativePackageDescriptor | Metadata descriptor for a native package asset. |
| Object3DAsset | Base asset type for 3D object models. |
| ObjectOwner | Base class for entities which has object and component relationship such as Editor.Assets.Scene and Editor.Assets.ObjectPrefab. |
| ObjectPrefab | Reusable object template that can be instantiated in scenes. |
| ObjectTrackingTexture | A native asset that provides information for object tracking texture. |
| Pass | Rendering pass asset used within a material. |
| RemoteMLAsset | ML asset backed by a remote device-dependent resource. |
| RemoteReferenceAsset | Reference to a remote asset identified by an asset ID. |
| RenderMesh | 3D mesh asset for rendering geometry. |
| RenderTarget | A native asset that provides the target for a camera to provide its output to. |
| Scene | The entity which will be converted into the Lens scene during project export. |
| ScriptAsset | Script asset that can be attached to scene objects, containing inputs, attachments, and metadata. |
| SegmentationTexture | A native asset that provides information for segmentation texture. |
| SnapcodeMarker | A native asset that can be used with LensScripting.MarkerTrackingComponent Learn more at LensScripting.SnapcodeMarkerProvider. |
| SubgraphAsset | Asset representing a subgraph embeddable in other graphs. |
| SupabaseProject | Supabase project asset with connection credentials. |
| Texture | Base texture asset. |
| TypeScriptAsset | TypeScript script asset for Lens Studio plugins. |
| VectorComposite | Vector graphics asset created by importing an SVG file. |
| VideoTexture | Texture asset created by importing a video file. |
Objects and data
| API | Description |
|---|---|
| AssetCompressionSettings | Base type assigned to AssetImportMetadata.compressionSettings to set how an asset is compressed during import. |
| AssetImporterSettings | Entity subclass representing the structural organization of entities within a scene. |
| CustomVariationStyle | A user-defined named style on a variable Editor.Assets.Font. |
| DracoCompressionSettings | Sets Google Draco geometry compression on a mesh asset; assign to AssetImportMetadata.compressionSettings. |
| Editor.AnimationClip | Represents an animation clip instance with playback configuration. |
| Editor.Assets | Namespace containing all asset types for Lens Studio projects. |
| Editor.GaussianSplatting | Namespace providing utilities to create and import Gaussian splatting (GSAF) assets from PLY input files. |
| Editor.Graph | Utility class for converting between binary and YAML representations of graph files. |
| FileCompressionSettings | Base type for file-backed compression strategies, assigned to AssetImportMetadata.compressionSettings to set the compression applied at import. |
| FileTextureInfo | Holds texture file dimensions. |
| FileTextureInfo3D | 3D texture file information including depth. |
| FontCollectionEntry | Single entry within a FontCollection, pairing a Font or FontFamily asset with weight and italic style attributes. |
| FontFamilyEntry | Maps a single Font asset to a specific style (weight and italic flag) within a FontFamily. |
| MeshInfo | Read-only metadata describing the geometry and rigging of a mesh asset. |
| NamedInstanceInfo | Read-only named axis preset from the font's fvar table, for example "Condensed Bold". |
| PassBinding | Defines a binding parameter for a render pass with metadata for UI presentation and value constraints. |
| PassConfiguration | Plain configuration object describing a Pass asset, blend mode, and shader defines to apply to a PassInfo via setPassConfiguration. |
| PassInfo | The Editor.Assets.Pass on a Editor.Assets.Material. |
| PassUiData | Shader pass UI configuration data. |
| PerformanceCompressionSettings | Sets runtime-performance-tuned texture compression with optional mipmaps; assign to AssetImportMetadata.compressionSettings. |
| Physics | Namespace for physics-related assets and configuration. |
| RemoteAssetMetadata | |
| RemoteAssetOrganization | |
| RemoteAssetResource | |
| Sampler | Texture sampling configuration for filtering, mipmapping, and wrapping modes. |
| ScriptInputInfo | Metadata about a script input parameter. |
| SetupScript | Script executed during asset package setup. |
| SizeCompressionSettings | Sets size-prioritized texture compression at a configurable quality level; assign to AssetImportMetadata.compressionSettings. |
| TextureParameter | Associates a texture with a sampler for use in a material pass. |
| VariationAxisInfo | Read-only metadata describing one OpenType variation axis on a variable font. |
| Version | Used to set the version of script assets. |
Enums
| API | Description |
|---|---|
| AntialiasingMode | The aliasing mode of Editor.Assets.RenderTarget. |
| AntialiasingQuality | Enum for antialiasing quality levels. |
| BlendMode | The blendmode of a Editor.Assets.PassInfo. |
| ClearColorOption | How a Render Target should be cleared every frame Editor.Assets.RenderTarget. |
| CullMode | Enum that specifies which faces of a mesh to cull during rendering. |
| DepthBufferStrategy | The depth buffer strategy of a Editor.Assets.RenderTarget. |
| DepthFunction | How a Editor.Assets.PassInfo should determine its depth compared to others. |
| Editor.AnimationLayerBlendMode | Enum defining how animation layers blend with the base animation. |
| Editor.AnimationLayerScaleMode | Defines how animation layer scaling is applied to the base animation. |
| Editor.PlaybackMode | Enumeration of animation playback modes. |
| FilteringMode | How a texture should be sampled. |
| FrustumCullMode | The same entity as in Lens Scripting. |
| HandTracking3DHandType | Used with {Editor.Assets.HandTracking3DAsset}. |
| LocationType | Used with {Editor.Assets.Location}. |
| MSAAStrategy | Enum for multisample anti-aliasing strategy selection. |
| ObjectTrackingTextureType | Used with Editor.Assets.ObjectTrackingTexture. |
| PackagePolicy | Enum defining how asset packages can be unpacked and their transparency handling. |
| PassBindingType | Enum defining types of bindings for render passes. |
| RemoteAssetType | |
| ScriptType | The kind of script a Editor.Assets.ScriptAsset defines: a component that can be attached to a scene object, a module that other scripts import, or a custom a… |
| SegmentationType | Built in segmentation textures to be used with Editor.Assets.SegmentationTexture. |
| ShaderType | Enum of shader type categories. |
| TextureCompressionLevel | Quality preset selecting how aggressively a texture is compressed. |
| VertexAttribute | Used witih Editor.Assets.FaceMesh |
| WrapMode | Options for what value is returned when a fetch falls outside the bounds of a texture. |
Related topics
Project & SceneThe open project and its scene: scene objects, entities, layers, the asset manager, and import and export.Files & SystemFiles and paths, processes and shells, the clipboard, storage, serialization, crypto, logging, and TypeScript compilation.ComponentsEvery component a plugin can add to a scene object and edit.