LensStudio:AssetUtils.js.findAsset
FunctionFinds an asset in the asset manager based on the specified type, name, and optional parent directory.
findAsset(
assetManager,assetType,assetName,parentDir?):Asset[]
Finds an asset in the asset manager based on the specified type, name, and optional parent directory.
Parameters
| Parameter | Type | Description |
|---|---|---|
assetManager | AssetManager | - |
assetType | string | The type of the asset to find. |
assetName | string | The name of the asset to find. |
parentDir? | Path | (Optional) The parent directory of the asset. If provided, the asset's source path must match this directory. |
Returns
Asset[]
An array of assets that match the specified criteria.