Skip to main content

LensStudio:AssetUtils.js

Module

The LensStudio:AssetUtils.js module for Lens Studio plugins.

Enumerations

EnumerationDescription
ShaderGraphType-

Functions

FunctionDescription
addDefineAdd a define to the pass info's defines array.
addGraphToMaterialAdds a pass to the given material and optionally adds define strings to the pass.
createMaterialFromGraphCreates a material from a shader graph asset.
findAssetFinds an asset in the asset manager based on the specified type, name, and optional parent directory.
findOrCreateNativeAssetFinds or creates a native asset with the specified name.
findOrCreateNonNativeAssetFinds or creates an asset in the asset manager.
findOrCreateObjectTrackingTextureFinds or creates an object tracking texture asset.
findOrCreateScreenTextureFinds or creates a screen texture asset.
getResourceFileRetrieves the resource file absolute path for the specified asset type.
importImageAsTextureImports an image as a texture and sets up its wrap mode.
setupSamplerWrapModeSet up the wrap mode for a sampler. If only one wrap mode is provided, it's applied to all dimensions.