There is an asset in the store I grabbed. the coding is WAY above my head, I got about half of it and integrated and adapted what I can to it. im going as far as I can with it and ill come back in a few month when I understand t better.
3.1 KiB
uid |
---|
addressables-get-address |
Getting addresses at runtime
By default, Addressables uses the address you assign to an asset as the PrimaryKey value of its IResourceLocation instance. (If you disable the Include Addresses in Catalog option of the Addressables group to which the asset belongs, the PrimaryKey could be a GUID, label, or an empty string.) If you want to get the address of an asset that you load with an AssetReference or label, you can first load the asset's locations, as described in Loading Assets by Location. You can then use the IResourceLocation instance to both access the PrimaryKey value and to load the asset.
The following example gets the address of the asset assigned to an AssetReference object named MyRef1
:
[!code-cssample]
Labels often refer to multiple assets. The following example illustrates how to load multiple Prefab assets and use their primary key value to add them to a dictionary:
[!code-cssample]