Organizing Wwise Events with Data Assets in UE4

Similar to Scriptable Objects in Unity, we can organize Wwise Events in an asset file named Data Asset. These are simple assets that can can store data references. We can use Data Assets to store references to our Wwise Events.

What are the benefits of using Data Assets?

If we select Wwise Events directly in the Blueprint nodes provided by the Wwise Integration and later decide to change our Event names or Event structure in the FMOD Studio project, we will lose the references to the Events and have to update all our Wwise Post Event nodes for example. By using Data Assets, we an store the Event references in one central asset and update only that file if we need so.

Creating a Data Asset for storing Wwise Events in Unreal Engine 4

Add a new Blueprint Class and select Primary Asset Data from the class list:

Primary Data Asset Class in Unreal Engine 4
Primary Data Asset Class in Unreal Engine 4

Name the new Blueprint Class something like PlayerAudioData (for a hypothetical player sound sheet) and open the Blueprint.

In the Blueprint EventGraph, create a new variable and select Ak Audio Event as a variable type. Repeat this step for each sound. For this tutorial I will create three example Events named Jump, Run and Attack:

Primary Data Asset variables
Primary Data Asset variables

Compile the Blueprint and now create a new Data Asset by clicking with the right mouse button on the Content Browser and selecting Miscellaneous->Data Asset. In the Pick Data Asset window, select the Blueprint Class we created earlier, namely PlayerAudioData. Give the new Data Asset an unique name, I will name the asset PlayerAudio. By opening the Data Asset, you will find the three variables you created in the Blueprint class with empty Ak Audio Event references:

Data Asset with empty references
Data Asset with empty references

Select your desired Wwise Event for each variable and save the Data Asset. In every new Blueprint you want to post Wwise Events, you can reference the Data Asset by creating a new Variable and selecting the Data Asset Class as the variable type (in our case PlayerAudioData). Compile the Blueprint and select the Data Asset as the default value:

Data Asset in a Blueprint
Data Asset in a Blueprint

We can now drag the Data Asset Class variable to the Blueprint and get every Wwise Event we specified in the initial Data Asset Class by using the Get node:

Getting Wwise Events from a Data Asset in a Blueprint
Getting Wwise Events from a Data Asset in a Blueprint

As you see in this image, we can get and attach the Event from the Data Asset to the Ak Event Object Reference in a Post Event node for example. If we need to change the Event names or reorganize the project in the Wwise authoring tool, we simply need to update the Events in the Data Asset instead of looking for each occurrence in different Blueprints.

↑ To the Top