Version

menu_open
Warning: you were redirected to the latest documentation corresponding to your major release ( 2022.1.17.8543 ). Should you wish to access your specific version's documentation, please download the offline documentation from the Audiokinetic Launcher and check the Offline Documentation option in Wwise Authoring.
Wwise Unity Integration Documentation
Wwise Addressable Samples

The Wwise addressable asset metadata preserver

When working with addressable Wwise assets, the easiest way to ensure that WwiseAddressableBank assets are up to date is to delete the generated soundbanks folder and regenerate soundbanks. Deleting addressable assets will clear the contents of addressables groups as the assets are deleted, so when they are reimported, their parent group and labels will be lost. This sample script included in the Wwise Unity Addressables package provides the functionality to preserve addressable asset metadata such as parent groups and labels.

How it works

We have added an optional setting that can be enabled to help restore lost groups and labels. It can be found in the Unity project settings, under Wwise Addressables. Once enabled, a target directory for the metadata can be specified. This directory should be within the Unity project's assets folder.

The WwiseAssetMetadataPreserver script adds a menu trigger under Assets/Wwise/Addressables to save the metadata of all Wwise addressable assets in the project. When triggered, an AddressableMetadata asset will be created for each addressable Wwise asset, serializing the name of the parent group and labels. The script also registers itself with the WwiseBankPostProcess.GetAssetMetadataDelegate function. This delegate allows external code to fill in a metadata struct that it used to set the asset's fields when it is imported by the WwiseBankPostProcess custom importer (which imports .bnk and .wem files when they are added to the Unity project).

With these two mechanisms, asset metadata can be serialized before doing a cleanup, and will be reapplied to the assets when they are reimported after generating soundbanks.

Note:

This script is intended as an example of how this can be done. You may find that it is more relevant to implement your own metadata filler that better suits your production requirements.

Sample code


Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise