# Is there a way to retrieve EventReferences from the BankLoader through code?

**URL:** <https://qa.fmod.com/t/is-there-a-way-to-retrieve-eventreferences-from-the-bankloader-through-code/18136>\
**Category:** Unity\
**Created:** [December 23, 2021, 1:31pm UTC](https://qa.fmod.com/t/is-there-a-way-to-retrieve-eventreferences-from-the-bankloader-through-code/18136 "2021-12-23T13:31:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AArtlone](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@AArtlone](https://qa.fmod.com/u/AArtlone)\
**Post date:** [December 23, 2021, 1:31pm UTC](https://qa.fmod.com/t/is-there-a-way-to-retrieve-eventreferences-from-the-bankloader-through-code/18136/1 "2021-12-23T13:31:00Z")

</div>

Hey.

So I want to avoid having to reference the EventReference in Unity Editor, and instead just access EventReferences of a specified bank through code.

So I thought I would be able to do something like:  
bankLoader[index].GetEventReference()

But I found out that the bank is just a string.

Could you suggest any solutions to how I can access EventReferences through code at runtime?

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [December 30, 2021, 5:57am UTC](https://qa.fmod.com/t/is-there-a-way-to-retrieve-eventreferences-from-the-bankloader-through-code/18136/2 "2021-12-30T05:57:34Z")

</div>

I think there’s some confusion. The BankLoader and EventReference in Unity is just a way for the user to select a bank or event via the Unity editor UI. Both will actually just return the path string which is then used to load via the Studio API.

You can utilize `Bank::getEventList()` of a loaded bank to get a list of all event descriptions (that contain the event path) in your code.

[https://www.fmod.com/resources/documentation-api?version=2.02&page=studio-api-bank.html#studio\_bank\_geteventlist](https://www.fmod.com/resources/documentation-api?version=2.02&page=studio-api-bank.html#studio_bank_geteventlist)
