LensStudio:AssetUtils.js.findOrCreateNonNativeAsset
FunctionFinds or creates an asset in the asset manager.
findOrCreateNonNativeAsset(
assetManager,assetAbsPath,destDirInProject):Promise<Asset>
Finds or creates an asset in the asset manager.
Parameters
| Parameter | Type | Description |
|---|---|---|
assetManager | AssetManager | The asset manager instance. |
assetAbsPath | Path | The absolute path of the asset. |
destDirInProject | Path | The destination directory in the project. this is a relative path to the project Assets root. |
Returns
Promise<Asset>
The primary asset found or created.
Throws
Error if there is an error importing the asset or if the import result is invalid.