# Best way to create our own RuntimeManager

**URL:** <https://qa.fmod.com/t/best-way-to-create-our-own-runtimemanager/20213>\
**Category:** Unity\
**Created:** [May 12, 2023, 10:11am UTC](https://qa.fmod.com/t/best-way-to-create-our-own-runtimemanager/20213 "2023-05-12T10:11:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeppeFlashbulb](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@jeppeFlashbulb](https://qa.fmod.com/u/jeppeFlashbulb)\
**Post date:** [May 12, 2023, 10:11am UTC](https://qa.fmod.com/t/best-way-to-create-our-own-runtimemanager/20213/1 "2023-05-12T10:11:47Z")

</div>

Hi, due to our team having a lot of internal tools and startup flows we would like to make our own system like the RuntimeManager since we don’t want to modify that one and have it break when we upgrade the Integration some time in the future.

The problem is that much of the integration (Specifically the Platform and settings) are marked as internal and cant be accessed outside the FMOD assembly. Is there a workaround for this that does not involve going in and making these public instead of internal?

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [May 15, 2023, 5:22am UTC](https://qa.fmod.com/t/best-way-to-create-our-own-runtimemanager/20213/2 "2023-05-15T05:22:57Z")

</div>

Hi,

It really depends on what exactly you’re trying to accomplish. The FMOD Unity integration comes with `FMODUnity.PlatformCallbackHandler`, which will allow you to provide a custom class that will receive callbacks from FMOD, and would be useful if what you need falls within its scope. Please see our [Unity docs page on it](https://www.fmod.com/docs/2.02/unity/examples-callback-handler.html) for more info.

As for a workaround to the `internal` FMOD functions, you may wish to leverage [friend assemblies](https://learn.microsoft.com/en-us/dotnet/standard/assembly/friend) to access them from your own Assembly. Depending on what you need, [extension methods](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/extension-methods) might be useful to add functionality to the existing FMOD classes if you don’t want to modify them.

If you do intend to create your own `RuntimeManager` class, it unfortunately won’t be as simple as just creating your own class - `RuntimeManager` itself is a lazy loaded singleton, so it will initialize when called into, and many other `FMODUnity` classes (`StudioEventEmitter`, `StudioListener`, etc.) explicitly call into it `RuntimeManager` and will need to be changed to accommodate your new class.

Ultimately, if you need a level of fine control that is beyond what the integration currently offers, you will need to either edit the source, or create your own set of classes to handle interaction with the FMOD API. That said, you can see a list of changes to the integration with each update on the [fmod-for-unity GitHub repo](https://github.com/fmod/fmod-for-unity/commits/2.02), which may be helpful when you do need to upgrade.

---

<div class="post-metadata">

**Author:** ![jeppeFlashbulb](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@jeppeFlashbulb](https://qa.fmod.com/u/jeppeFlashbulb)\
**Post date:** [May 15, 2023, 8:57pm UTC](https://qa.fmod.com/t/best-way-to-create-our-own-runtimemanager/20213/3 "2023-05-15T20:57:19Z")

</div>

Thanks for the help!

I ended up going with a Assembly Definition Reference´s and just link our own manager to the FMOD assembly so I could use the platform things and still use the settings i want to use. We do a lot of ESC stuff anyways so we arent gonna use many of the build in FMOD components but still want to keep all the editor stuff.

The github repro is gonna be super helpful for when we need upgrading, thanks!

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [May 15, 2023, 9:53pm UTC](https://qa.fmod.com/t/best-way-to-create-our-own-runtimemanager/20213/4 "2023-05-15T21:53:44Z")

</div>

No problem, glad I could help!
