LensStudio:AssetLibrary.Asset
ClassA handle for an asset from the Asset Library.
Index
Properties
Example
// AssetLibrary.Asset represents a single entry in the online asset library.
// It has a protected constructor -- you receive Asset objects from service responses.
// Demonstrates reading Asset properties from a query response:
const { IAssetLibraryProvider, AssetFilter, AssetListRequest, EnvironmentSetting, Environment, Space } = await import('LensStudio:AssetLibrary');
const provider = this.pluginSystem.findInterface(IAssetLibraryProvider.interfaceId) as import('LensStudio:AssetLibrary').IAssetLibraryProvider;
const filter = new AssetFilter();
filter.searchText = '3D';
const envSetting = new EnvironmentSetting();
envSetting.environment = Environment.Production;
envSetting.space = Space.Public;
const request = new AssetListRequest(envSetting, filter);
const response = await provider.assetService.fetchAsync(request);
if (response.ok && response.data) {
const asset = response.data.assets[0];
console.log('assetId:', asset.assetId);
console.log('assetName:', asset.assetName);
console.log('description:', asset.description);
}
Properties
assetId
readonlyassetId:string
The id of the asset.
assetName
readonlyassetName:string
The name of the asset.
assetType
readonlyassetType:AssetType
The type of the asset.
complexity
readonlycomplexity:number
Complexity rating of the asset.
creator?
readonlyoptionalcreator?:Creator
Name or identifier of the asset's creator.
description
readonlydescription:string
Short description of the asset.
documentationUrl
readonlydocumentationUrl:string
URL pointing to the asset's documentation page.
fullDescription
readonlyfullDescription:string
Full-length description of the asset.
maxLsVersion
readonlymaxLsVersion:Version
Maximum Lens Studio version compatible with this asset.
platforms
readonlyplatforms:Platform[]
List of platforms the asset supports.
previews
readonlypreviews:Resource[]
Preview images or media associated with the asset.
resources
readonlyresources:Resource[]
A handle for the resources contained in the asset that can be downloaded.
subcategories
readonlysubcategories:Subcategory[]
Subcategory tags assigned to the asset.