Documentation: Adding FMOD events in Unity - Jelmerrr/DeepDive-SFX-Manipulation GitHub Wiki
How to Add FMOD events in Unity
This page covers they workflow of implementing SFX created in FMOD in Unity. It covers both the workflow on the side of FMOD as well as what is needed to happen on the Unity side.
File setup
The first step is setting up the proper file structure related to the FMOD Studio project. FMOD is made in a way that even if a user does not have FMOD Studio installed on their computer they can still hear the SFX dynamically in-editor. For this to function properly the FMOD Studio project needs to be located within the Unity project. Specifically at the same level as the assets folder and other highlevel Unity files.
This ensures that the FMOD Studio project is still loaded properly even when other contributers of the project do not have FMOD Studio installed.
FMOD for Unity plugin
In order to make FMOD communicate properly with Unity there is a package developed by FMOD that handles the communication between the two.
After installing the FMOD package there is a setup wizard that is needed to be completed. The setup wizard will ask you to link your FMOD studio project and handles all the other stuff related to FMOD.
FMOD events and banks
Each SFX you want to add to your game is an unique FMOD event. An FMOD event can be seen as something similar to a script or gameObject in Unity. A bank is a collection of events that the FMOD Studio project sends over to Unity. In FMOD Studio you can assign events to banks and then push those banks to Unity through building the project (F7).
Playing events in Unity
After building your events you can add them to be played in Unity. This can be done in 2 ways, through code or through sound emitters in editor. This page focuses on sound emitters in editor since they are easier to implement and easier to visualize. In Unity you can create a gameObject and add the FMOD Studio Event Emitter component. In this component you can select the event you want to play and what the trigger conditions should be. Along with that the comonent features some advanced options such as one-time trigger and allowing fadeout when the event is stopped.