LensStudio:AssetLibrary
ModuleThe LensStudio:AssetLibrary module for Lens Studio plugins.
Before using anything in this namespace, make sure to import LensStudio:AssetLibrary.
Example
// The LensStudio:AssetLibrary module provides access to the online asset library.
const AssetLibrary = await import('LensStudio:AssetLibrary');
const provider = this.pluginSystem.findInterface(
AssetLibrary.IAssetLibraryProvider.interfaceId
) as import('LensStudio:AssetLibrary').IAssetLibraryProvider;
// Access the three services on the provider
const assetService = provider.assetService;
const assetsByIdsService = provider.assetsByIdsService;
const musicService = provider.musicService;
console.log('AssetLibrary services available:',
!Editor.isNull(assetService), !Editor.isNull(assetsByIdsService), !Editor.isNull(musicService));
Enumerations
| Enumeration | Description |
|---|---|
| AssetType | The types of assets that might be provided by the "LensStudio:AssetLibrary". |
| Environment | The Asset Library environment which assets should be searched within. In most cases Production should be used. Used with "LensStudio:AssetLibrary".EnvironmentSetting. |
| Platform | Enum representing the target platform associated with an asset. |
| Space | The Asset Library space which assets should be searched within. In most cases Public should be used. Used with "LensStudio:AssetLibrary".EnvironmentSetting. |
Classes
| Class | Description |
|---|---|
| Asset | A handle for an asset from the Asset Library. |
| AssetFilter | A filter used to narrow down an AssetListRequest. |
| AssetListRequest | A request object for finding assets in the Asset Library. |
| AssetListResponse | A handle returned by the "LensStudio:AssetLibrary".AssetListService. |
| AssetListService | A handle to the "LensStudio:AssetLibrary".AssetListService which can provide a list of assets based on the passed in parameters. |
| AssetListSuccess | The result of a fetch call by the "LensStudio:AssetLibrary".AssetListService, which provides you a list of matching assets in the Asset Library. |
| Creator | Information about the creator or author of an Asset Library asset. |
| EnvironmentSetting | A configuration object that describes what Asset Library environment should be accessed. |
| GetAssetsByIdsRequest | Request object for fetching specific assets by their unique identifiers. |
| GetAssetsByIdsResponse | Response returned when fetching assets by IDs, containing matched assets or an error. |
| GetAssetsByIdsService | Service interface for submitting get-assets-by-IDs requests. |
| IAssetLibraryProvider | A handle that provides access to the AssetLibraryListService. |
| LicensedMusic | Provides access to licensed music import functionality for adding music assets to a project. |
| MusicAsset | Handle for a music asset from the Asset Library. |
| MusicListResponse | Response returned from a music list query, containing either a success result or a service error. |
| MusicListService | Service interface for submitting and managing music list requests. |
| MusicListSuccess | Successful result of a music list request, containing the returned music assets. |
| Pagination | Configuration for the page to be accessed in a "LensStudio:AssetLibrary".AssetFilter. |
| Resource | The actual resources of an "LensStudio:AssetLibrary".Asset. |
| ServiceError | The callback of an errored fetch call by the "LensStudio:AssetLibrary".AssetListService. |
| Subcategory | Tag or classification used to further categorize an asset within its primary asset type. |