LensStudio:AssetUtils.js.findOrCreateNativeAsset
FunctionFinds or creates a native asset with the specified name.
findOrCreateNativeAsset(
nativeAssetTypeName,assetManager,basename,destinationDir?):Asset
Finds or creates a native asset with the specified name.
Parameters
| Parameter | Type | Description |
|---|---|---|
nativeAssetTypeName | string | The name of the native asset. |
assetManager | AssetManager | The asset manager. |
basename | string | The base name of the asset. |
destinationDir? | Path | the relative path to Assets root in the project, if searching will be limited to this directory, and the asset will be created in this directory if not found. If not provided, the search will be done in the entire project and the creation will be in the root directory. |
Returns
The found or created native asset.