# Get bus (or rooting) of an event

**URL:** <https://qa.fmod.com/t/get-bus-or-rooting-of-an-event/16447>\
**Category:** FMOD Studio\
**Tags:** unity\
**Created:** [November 20, 2020, 3:09pm UTC](https://qa.fmod.com/t/get-bus-or-rooting-of-an-event/16447 "2020-11-20T15:09:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lupusanghren](https://avatars.discourse-cdn.com/v4/letter/l/ba9def/32.png) [@Lupusanghren](https://qa.fmod.com/u/Lupusanghren)\
**Post date:** [November 20, 2020, 3:09pm UTC](https://qa.fmod.com/t/get-bus-or-rooting-of-an-event/16447/1 "2020-11-20T15:09:07Z")

</div>

Hi, i’m doing a tools for spacialization debug in Unity.

I want to filter the event currently playing (i have a list of event instance) by the bus they are currently using.  
For instance, only event played in the bus:/MASTER/gameplaySFX.

But so far I couldn’t find any ways to get a bus or a bus path from an event instance, same output for the other way around, I couldn’t find a event instance from a bus.

I’m currently trying with channel groups but can’t figure out what they are in code (I got them in FMOD Studio) but I can’t even get a proper to try to compare something

Thanks for the hep,  
Raphaël

EDIT : After some tries with the channel group i finally got something, but only the master bus as [Studio::EventInstance::getChannelGroup](https://fmod.com/resources/documentation-api?version=2.1&page=studio-api-eventinstance.html#studio_eventinstance_getchannelgroup) gives only the core (meaning master group).  
I don’t know what to try anymore.

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [November 23, 2020, 3:29am UTC](https://qa.fmod.com/t/get-bus-or-rooting-of-an-event/16447/2 "2020-11-23T03:29:00Z")

</div>

There is no way from the game side to get the bus routing for a given Event. If you need this information at runtime your best bet would be to export it from the FMOD Studio project using scripting.

---

<div class="post-metadata">

**Author:** ![Lupusanghren](https://avatars.discourse-cdn.com/v4/letter/l/ba9def/32.png) [@Lupusanghren](https://qa.fmod.com/u/Lupusanghren)\
**Post date:** [November 23, 2020, 5:08pm UTC](https://qa.fmod.com/t/get-bus-or-rooting-of-an-event/16447/3 "2020-11-23T17:08:52Z")

</div>

Yeah I was thinking about this.  
Do I need to create my own data structure to save everything throught custom script in FMOD, then use this data structure to be able to get it at run time ? (Not sure if that make sense)

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [November 23, 2020, 10:44pm UTC](https://qa.fmod.com/t/get-bus-or-rooting-of-an-event/16447/4 "2020-11-23T22:44:44Z")

</div>

Yes, you would need to write your own data file using the FMOD Studio script, then load that file in the game. We ship some example scripts with FMOD Studio you could use as reference, for example exportGUIDsHeader.js in the scripts directory of the application.

---

<div class="post-metadata">

**Author:** ![Lupusanghren](https://avatars.discourse-cdn.com/v4/letter/l/ba9def/32.png) [@Lupusanghren](https://qa.fmod.com/u/Lupusanghren)\
**Post date:** [November 24, 2020, 8:41am UTC](https://qa.fmod.com/t/get-bus-or-rooting-of-an-event/16447/5 "2020-11-24T08:41:01Z")

</div>

Thank you ! I think I will be able to manage from there
