Issue with playing an audio clip as a FMOD sound


I have been looking for a way to play an unity audio clip as a FMOD sound.

There are solution for this query from the previous versions of FMOD : -

But none of these solution are working for me I updated the the code according to the
current APIs please check my script attached in which you will find both the methods
I referred from the links above.
What should I do?

My Script.txt (3.3 KB)


There are a few things that will need to be fixed before you can use Unity Audio Clips.

Firstly enable Unity Audio again under the Unity toolbar Edit drop-down → Project Settings → Audio → Disable Unity Audio. Keep in mind with Unity Audio re-enabled the FMOD audio will no longer be heard on PS5 and Xbox.

Currently channel_group isn’t part of the FMOD signal chain so when we are calling RuntimeManager.CoreSystem.playSound() with the channel_group as it is, it won’t be heard. The easier way to fix this is to assign channel_group to the MasterChannelGroup as this is where all sound eventually goes. To do this we will call FMODUnity.RuntimeManager.CoreSystem.getMasterChannelGroup(out channel_Group). So now when we call playSound() the audio from the clip will be heard as it is part of the MasterChannelGroup.

A tip, call Debug.Log() on the output of result each time it is assigned, rather than just at the end of the function. Logging the results value at the end of the function will just be its most recent assignment.

Lastly, make sure that channel.setPaused() is set to false to allow the sound to play.

Hopefully, this will allow the Audio Clip to play!

Thanks @Connor_FMOD
It’s working now!!!

1 Like