How to set 3D sound mute?

(zteng) #1

Hi,all.I had a problem when I am using fmod in Unity.I want to set 3D sound mute,so I do that:
FMOD.Studio.EventInstance event = FMOD_StudioSystem.instance.GetEvent(path);
but the sound is not mute;so I want to know whether I can do that.
I’m looking forward to answering this question ,thank you.

(Nicholas Wilcox) #2

FMOD_StudioSystem.instance.GetEvent() returns a new instance of the event.

You need to call setVolume() on the previous instance.

(zteng) #3

Thank you and answer my question, Yes,I’m coding according to your example:
engine = FMOD_StudioSystem.instance.getEvent(“event:/Vehicles/Car Engine”); engine.start();
I can control the event start and stop,but I can not control the event volume,if I want to set the Volume, what should I do?I can do it in 2d sound by using event.setVolume;but it is useless when I do it in 3d sound.Thank you.