Changing volume of a track from C# script in Unity

Let’s say I have an FMOD event that has two tracks. I want to sometimes lower the volume of one of the tracks but not the other, and I want this to be a single event. Is this possible to do from C#? I’ve tried using a multi-sound and setting volume for one of the sounds there but that didn’t work. I also tried making an event from two different existing events assigned to different busses but that didn’t work either.

It sounds like you want parameters. Parameters allow you to define ways in which your event’s behavior may change according to your game’s state.

In your case, you should add a parameter to your event, then automate the volume of the track whose volume you want to lower on that parameter. Then, to change the volume of that track, all you’ll need to do is change the value of that parameter using your game’s code.

Incidentally, a multi instrument won’t work because it’s a tool designed to play one audio file at a time. You should create an event with two audio tracks, and place a different single instrument on each track.