I wrote a little editor script to fetch some data from my FMOD Project in the Editor (it creates a Dictionary containing Events and their Banks). Is there a way to call this automatically when using the “Refresh banks” button? Is there a Callback I can hook into?
Hi,
There’s no callback you can hook into, but you can modify the relevant source code:
- The bulk of the code for the Bank Refresher is at “./Assets/Plugins/FMOD/src/Editor/BankRefresher.cs”
- The actual process of reading from the updated banks and generating editor assets is handled by
EventManager.RefreshBanks()
in “./Assets/Plugins/FMOD/src/Editor/EventManager.cs” - The Bank Fresh window is handled by “./Assets/Plugins/FMOD/src/Editor/BankRefreshWindow.cs”
By the sounds of it, you’ll probably want to insert your code after line 233 of BankRefreshWindow.cs
, which is where the code handling the clicking of the “Refresh” button in the bank refresh window is located.
Thank you, that worked perfectly!