Version:
1.2
Format:
Unity package
Dependencies:
BGDatabase, Addressables, Addressables plugin ,Visual Scripting or Bolt
Description
Custom units for Unity Visual Scripting (or Bolt) to load assets from Unity Addressables system
There are 2 different methods for loading assets
- By using BGAddressablesGetAsset unit (suitable for loading a single asset)
- By using events (suitable for loading multiple assets at once)
Method #1 setup:
Custom action (BGAddressablesGetAsset under BansheeGz category) for Bolt. Loading is asynchronous and may take several frames to load an asset. This method is not suitable for loading multiple assets at once
- Unit requires a Unity Event to be called in coroutine mode. Make sure Unity event has "Coroutine" toggle on
- Add BGAddressablesGetAsset unit. Assign correct meta name, field name and pass correct entity identifier (Index, ID or name). The call may take several frames to load an asset, cause loading is asynchronous
- Use "exit" out control to read the asset.
- Use "exitNoWait" out control to continue execution without waiting until asset is loaded (note, the asset is available only after exit control is executed)
Method #2 setup:
This method is suitable for loading multiple assets at once. Loading is split into 2 phases:
- Requesting an asset loading (using BansheeGz/BGAddressablesGetAssetViaEvent unit)
- Once the asset is loaded, an event is fired (Events/BansheeGz/BGAssetLoadedEvent) with the asset as an argument. Additional information is also provided so the origin of the asset can be identified (table, field, entity, optional eventData object)
Releases
Click to see all releases
Version | Release date | Log |
---|---|---|
1.2 | Nov 27, 2020 | Added additional method of loading assets (via events) |
1.1 | Oct 18, 2020 | "exitNoWait" output control is added to allow to continue control flow without waiting |
1.0 | Sep 16, 2020 | Versioning reset (unified plugin infrastructure) |
0.1.1 | July 14, 2020 | Make use of addressables cache to improve loading assets if unit is called more than once |
0.1.0 | June 19, 2020 | Initial release |