# Control panner on master bus through Unity

**URL:** <https://qa.fmod.com/t/control-panner-on-master-bus-through-unity/20325>\
**Category:** Unity\
**Created:** [June 18, 2023, 1:20pm UTC](https://qa.fmod.com/t/control-panner-on-master-bus-through-unity/20325 "2023-06-18T13:20:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zeanix](https://avatars.discourse-cdn.com/v4/letter/z/ee7513/32.png) [@Zeanix](https://qa.fmod.com/u/Zeanix)\
**Post date:** [June 18, 2023, 1:20pm UTC](https://qa.fmod.com/t/control-panner-on-master-bus-through-unity/20325/1 "2023-06-18T13:20:33Z")

</div>

Hello! I’m still understanding the ins and outs of FMOD and couldn’t find this topic anywhere. In Unity, I’m trying to set up a slider control in an audio settings menu for the Panner with the goal of helping people with hearing impairments adjust the location of the sound. So, in Routing, on the Master Bus, I have added a Panner effect, but don’t know how to navigate to it in order to control it within Unity. Any suggestions or resources would be greatly helpful.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [June 20, 2023, 3:58am UTC](https://qa.fmod.com/t/control-panner-on-master-bus-through-unity/20325/2 "2023-06-20T03:58:57Z")

</div>

Hi,

An option would be adding `Automation` ([FMOD Studio | Authoring Events - Automation and Modulation](https://fmod.com/docs/2.02/studio/authoring-events.html#automation-and-modulation)) to the `Direction` variable ([FMOD API | Effect Reference - Pan](https://fmod.com/docs/2.02/api/effects-reference.html#2d-surround-output-mode-direction)) of the `Panner` effect. Automation allows us to control parameters from code in Unity via: `FMODUnity.RuntimeManager.StudioSystem.setParameterByName()` ([FMOD API | Studio API Reference - Studio::System](https://fmod.com/docs/2.02/api/studio-api-system.html#studio_system_setparameterbyname)).

Here is the parameter I used to control the value:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/2/2890ea7ee0d475f358150c2eba68db371a63ec11.png)

I have the effect set up in Studio, with the `Extent` set to `180` to limit the panning to the left or right when the `Direction` is changed.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/b/bc83acaffc9726c834411f4194d7a73ee97110bf.png)

Then in Unity, you control the parameter like this:

```auto
// Pan right
FMODUnity.RuntimeManager.StudioSystem.setParameterByName("Surround Direction", 90)
// Pan left
FMODUnity.RuntimeManager.StudioSystem.setParameterByName("Surround Direction", -90)

```

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Zeanix](https://avatars.discourse-cdn.com/v4/letter/z/ee7513/32.png) [@Zeanix](https://qa.fmod.com/u/Zeanix)\
**Post date:** [June 21, 2023, 7:20am UTC](https://qa.fmod.com/t/control-panner-on-master-bus-through-unity/20325/4 "2023-06-21T07:20:52Z")

</div>

After doing a little tweaking, I was able to get this working based on your breakdown and information. Thank you for the help!

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [June 21, 2023, 7:34am UTC](https://qa.fmod.com/t/control-panner-on-master-bus-through-unity/20325/5 "2023-06-21T07:34:05Z")

</div>

No worries, happy to help! If you have any more questions please do not hesitate to ask!
