Version

menu_open

Build your Unity Game for a Target Platform

Building your Unity game for a target platform is a two-step process:

  1. Pre-generate or add the SoundBanks to the StreamingAssets folder.
  2. Build or build and run your application using Unity's standard pipeline or a build script.

Wwise plug-in deployment

The Unity build system automatically packages the Wwise plug-in with the game. By default, the Profile configuration of the plug-in is used. This is the most practical configuration for game development because it allows you to connect Wwise to your game for profiling. However, when you are ready to release your game, go to the Assets > Wwise > Activate Plugins menu to change your Wwise plug-in configuration to the Release option.

Note.gif
Note: Debug is only used for debugging specific issues with the sound engine, which is usually done with the assistance of Audiokinetic support.
See also:

StreamingAssets folder

Unity normally creates a StreamingAssets folder (manually create one if it does not exist in your Unity project) in the Unity project's Assets folder, as shown here: <UNITY_PROJECT_ROOT>\Assets\StreamingAssets. Unity automatically deploys this folder's content to the target device. See Unity's StreamingAssets feature for details.

The default SoundBanks path, Audio\GeneratedSoundBanks, is found under the StreamingAssets folder. At the end of this path, Unity adds a folder for the current platform, as it was named in your Wwise project's Platform Manager. This gives a full final path of <UNITY_PROJECT_ROOT>\Assets\StreamingAssets\Audio\GeneratedSoundBanks\<YourPlatform>.

Note.gif
Note: If necessary, you can call AkInitializer::basePath to change the default SoundBanks path.

When running in the Unity editor, the SoundBanks path is always set to point to the Wwise project's GeneratedSoundBank path, which is defined in Wwise's Project Settings dialog. This way, when integrating sounds in your game in Windows or on a Mac, you can avoid bank deployment issues.

Deploying SoundBanks in single-platform projects

If you are working on a single platform title, instead of physically moving SoundBank files into the StreamingAssets folder, the SoundBank output path in a Wwise project can be set to the desired folder under the StreamingAssets folder so that the SoundBanks can be generated directly into the desired location. This is the simplest workflow because it avoids the complexities of a build script.

Deploying SoundBanks in multi-platform projects

For productions that ship on multiple platforms, you need to run a script that copies only the SoundBanks and streaming sounds for the specific platform which you are building the game on. Otherwise, the game size will be needlessly bloated. As a workaround, we suggest that the SoundBank Output Path of the Wwise project be left to generate inside the Wwise project, then the SoundBanks are copied over when the game is built. To do so, use a pipeline build script to copy the SoundBanks and streamed files for the correct platform. An example is shown in UNITY_PROJECT_ROOT\Assets\Wwise\Editor\WwiseMenu\Common\AkExampleAppBuilderBase.cs.

Final implementations should be decided by game developers to accommodate the potential need for more elaborate management.

Handling multiple custom platforms for a reference platform

If, in your Wwise project, you have defined multiple versions of the same reference platform, such as an iPad and an iPhone platform targeting iOS, some more scripting will be needed. See Using Wwise Custom Platforms in Unity for more information.

Exclude SoundBank metadata

Wwise generates SoundBank metadata files (such as TXTs and XMLs). They contain information about the SoundBanks to be used by your other pipeline tools, but are useless to the game. It is not necessary to copy them into your final StreamingAssets folder.

Generated on Tue Nov 21 09:21:29 2017 for Wwise Unity Integration by  doxygen 1.6.3

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