Unity FMOD Cross Scene Audio

Hello. I’ve been implementing FMOD into a Unity project, primarily following the lead of the video done by Shaped By Rain Studios.

One thing the video does not cover is what are the practices for carrying FMOD values between scenes, nor has any other post on this forum properly answered my questions about this.

I have a singular music track in FMOD that the composer set up with transitions set to the parameter system. The question I have is how to arrange components in Unity so that we can properly transition between these portions of the music.

Currently my Main Menu scene has a Managers game object containing an AudioManager with associated script and and FMODEvents object with the FMODEvents script where the audio information is defined from the FMOD Banks as well as an FMOD Studio Event Emitter script which sets the music to being on “Object Start”.

Is the proper course of action to ensure that the Managers object transitions between scenes, then when loading the level (or other game events) to change the parameter for the music Event? I want to be sure I’m not creating problems for myself if I go down this path.

Thanks much.

Hi,

Thank you for sharing the information.

You’re absolutely on the right track, and your approach of keeping the Managers object persistent across scenes is a solid one.

Since you’re using FMOD’s parameter system for transitions, a simple method that you might consider would be to:

  • Call DontDestroyOnLoad(this.gameObject) in your AudioManager (or a related script) to persist the object across scenes.
  • Store a reference to your music EventInstance for better control.
  • Drive music transitions by calling EventInstance.setParameterByName, updating parameters as needed during scene changes or gameplay events.

Hope this helps! Let me know if you have any questions.