[solved] Set Event Volume with GVR in Unity

Hi guys,

My problem is quite simple : I want to scripticaly set the volumes of my events in my project.

The GVR plugin is good to work in VR but it overpass all buses to let only the master bus and I can’t create a fade out for most of my sounds.

I looked there : https://www.fmod.org/questions/question/could-i-change-volumes-of-fmod-within-unity/ but the links are no longer in use.

I tried to use an FMOD parameter but when I’m in Unity, the paramater doesn’t change the volume value.

What can you advise me ?

I finally find my own answer. It’s actually very simple and I’m highly surprise about the difficulty to find it in the documentation.

My answer was here : https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD_Studio_EventInstance_SetVolume.html#/

If the link get lost (like most other links in the forum) it’s in the documentation, under
Reference --> Studio API --> Classes --> EventInstance --> EventInstance::setVolume

it’s actually a gold mine but it’s unfriendly and you have to look deep…

Here is my code for whom it might help :

FMODUnity.StudioEventEmitter audioEvent;

void Start () {
audioEvent = GetComponent<FMODUnity.StudioEventEmitter>();
audioEvent.EventInstance.setVolume(0.5f); // value to change