The FMOD audio middleware has two components that we will need to install in order to create and ship adaptive audio alongside the rest of our game. These are:
- FMOD Studio - The desktop application used to implement/author adaptive audio/music.
- FMOD for Unity - A Unity package that contains the FMOD run-time. It will also make possible live communication with FMOD Studio.
Go to the FMOD website and download these two components making sure to select the same version number for both and your target operating system. You'll need to create an account to access the downloads page. The most current version at the time of writing of this post is the 2.02.11.
To Install and configure FMOD in your project follow these steps:
- Follow the installer prompts to Install FMOD Studio on your computer.
- In your Unity project go to the “Assets” top menu, hover to “Import Package” and click “Custom Package”. Browse to the downloaded FMOD “unitypackage” file and click “Open”.
- An "Import Unity Package" Window will appear. Leave everything as is and click “Import”.
- After the import finishes you'll be presented with a FMOD Setup Wizard Window:
- Click start. Since this is a fresh FMOD installation, we won't need to do anything at the "Updating" step. Click next. We'll now take a pause at the "Linking" step.
- Without closing Unity or the FMOD wizard, launch the FMOD Studio application, then go to “File” and click “Save As…”. Select a location for your FMOD Studio project and click “Save”.
- Back on the Unity's FMOD wizard select "Fmod Studio Project". Navigate to the project's location and select the ".fspro" file, then click next.
- At this step you'll be presented with configuration options that essentially will make FMOD either your primary source of audio or the only source. The "Listener" step will ask if you want to replace the Unity's listener with the FMOD's one for positional sounds. The Following step will ask if you want to disable the Unity's audio engine. The last step presents you with a list of files that should be ignored by source control. If you're using a source control tool (such as git) it's a good idea to add them to the ignore list (.gitignore in the case of git).
- After all the steps you'll be presented with a checklist of the things that were or were not configured. Click "Close".
That's it! You now have your project setup and ready for use with the FMOD middleware.