1.0 KiB
1.0 KiB
uid
| uid |
|---|
| addressables-loading-asset-reference |
Load asset references
The AssetReference class has its own load method, LoadAssetAsync. The following is an example of loading an asset assigned to an AssetReference field in the Inspector:
[!code-cssample]
You can also use the AssetReference object as a key to the Addressables.LoadAssetAsync methods. If you need to spawn multiple instances of the asset assigned to an AssetReference, use Addressables.InstantiateAsync, which gives you an operation handle that you can use to release each instance.