How do I Set Panning for a bus in code?

I’m using a bus to set certain sounds to only play in either left or right speakers of my stereo setup.

I can easily adjust the panning in FMOD Studio, but I’d like to be able to set this in code as well.
I would expect to find a Bus::setPan function, but none exists.

I’m willing to consider alternative ways of sending my sounds to a single L/R channel.

The key way to do this is through automation. You could possibly use sends from events, if you want to send to a certain bus, and control the level with automation?
Automation exposes the control to the programmer so that they can alter the behavior the sound designer has created.

I expected that to be the case. However, can you elaborate on how to add automation to a bus? With an event, I can right-click a the panner knob and “Add Automation.” This option does not exist for the bus panner knob.

I was thinking more you have a bus already panned to left, and a bus panned to right, and you have 2 sends with automation on them inside the event.

You might as well just automate the master track’s output pan though, in this case, it would be more direct.

Actually I should mention you can use getChannelGroup in the FMOD event API and then use ChannelControl::setPan, but you may be stomping on studio settings so it would be best to be careful and test that it works properly. Maybe a bus that studio doesnt touch for example.