# FMODUnity.RuntimeManager.CreateInstance(string path) does not work after upgrade from 2.02.19 to 2.02.20

**URL:** <https://qa.fmod.com/t/fmodunity-runtimemanager-createinstance-string-path-does-not-work-after-upgrade-from-2-02-19-to-2-02-20/22087>\
**Category:** Unity\
**Tags:** unity, csharp\
**Created:** [September 13, 2024, 1:52pm UTC](https://qa.fmod.com/t/fmodunity-runtimemanager-createinstance-string-path-does-not-work-after-upgrade-from-2-02-19-to-2-02-20/22087 "2024-09-13T13:52:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abuki](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/abuki/32/7234_2.png) [@Abuki](https://qa.fmod.com/u/Abuki)\
**Post date:** [September 13, 2024, 1:52pm UTC](https://qa.fmod.com/t/fmodunity-runtimemanager-createinstance-string-path-does-not-work-after-upgrade-from-2-02-19-to-2-02-20/22087/1 "2024-09-13T13:52:37Z")

</div>

Hi,

I am using `FMODUnity.RuntimeManager.StudioSystem.getEvent(path, out eventDescription)` to check if an event with a specific path exists and then create it with `FMODUnity.RuntimeManager.CreateInstance(string path)`. The event can’t be found, and an instance cannot be created.

When referencing through EventReference instead of a path string, it works as it contains GUID, if I understand it correctly.

I found out that this stopped working after upgrade from 2.02.19 to 2.02.20

I have this use case - animation starts playing, I want to look if there is an event with an appropriate name and if so, start it. So I don’t have any serialized EventReference, only a dynamic path string.

My question is - is this a bug or intended behavior? Should there be this method overload when passing a path string does not work? And if this is intended behavior, how do you suggest creating events with dynamic paths? Any tips for caching GUIDs?

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:** [September 16, 2024, 2:25am UTC](https://qa.fmod.com/t/fmodunity-runtimemanager-createinstance-string-path-does-not-work-after-upgrade-from-2-02-19-to-2-02-20/22087/2 "2024-09-16T02:25:54Z")

</div>

Unfortunately, I haven’t been able to reproduce the issue you’re describing - I’m able to use `StudioSystem.getEvent()` to retrieve EventDescriptions by path, and also create the events by path with `RuntimeManager.CreateInstance()`, without any problems on 2.02.20.

I’d recommend checking the [FMOD\_RESULT](https://www.fmod.com/docs/2.02/api/core-api-common.html#fmod_result) that `Studio.getEvent()` is returning, which should help point you in the right direction. It’s also worth noting that in order for path-based lookups to succeed, your project’s [strings bank](https://www.fmod.com/docs/2.02/api/glossary.html#studio-strings-bank) must be loaded, which would be the go-to culprit for what you’re running into.

---

<div class="post-metadata">

**Author:** ![Abuki](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/abuki/32/7234_2.png) [@Abuki](https://qa.fmod.com/u/Abuki)\
**Post date:** [September 16, 2024, 7:46am UTC](https://qa.fmod.com/t/fmodunity-runtimemanager-createinstance-string-path-does-not-work-after-upgrade-from-2-02-19-to-2-02-20/22087/3 "2024-09-16T07:46:52Z")

</div>

Hi, thank you very much for the answer! It really was by strings bank not loaded. Strange that it worked in earlier version without it. Thanks!

Anyway, might be nice to add this note to the documentation that strings bank have to be loaded in order for paths to work. As it is strange when the same method is not working when passing EventReference and not a string path.

---

<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:** [September 17, 2024, 1:10am UTC](https://qa.fmod.com/t/fmodunity-runtimemanager-createinstance-string-path-does-not-work-after-upgrade-from-2-02-19-to-2-02-20/22087/4 "2024-09-17T01:10:12Z")

</div>

> [@Abuki](#):
>
> Anyway, might be nice to add this note to the documentation that strings bank have to be loaded in order for paths to work.

This information _is_ present in the Studio API reference, but isn’t in the Unity API reference, so I’ll flag the Unity docs for a fix - thanks for pointing that out.

> [@Abuki](#):
>
> As it is strange when the same method is not working when passing EventReference and not a string path.

Could I get you to elaborate on what you mean by this? A simple set of steps or a code snippet that reproduce the issue consistently would help me to identify what exactly the issue is.

---

<div class="post-metadata">

**Author:** ![Abuki](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/abuki/32/7234_2.png) [@Abuki](https://qa.fmod.com/u/Abuki)\
**Post date:** [September 17, 2024, 7:01am UTC](https://qa.fmod.com/t/fmodunity-runtimemanager-createinstance-string-path-does-not-work-after-upgrade-from-2-02-19-to-2-02-20/22087/5 "2024-09-17T07:01:59Z")

</div>

I am just thinking about the situation I experienced. I was searching hard but cannot find anything why FMODUnity.RuntimeManager.CreateInstance(string path) is not working while FMODUnity.RuntimeManager.CreateInstance(EventReference eventReference) for the same event is not.

Now I understand it, but to get to that info was a bit of pain and believe me I searched a lot 🙂 That is also what I found confusing (though I understand it now and don’t have any obvious solution) that these methods behaves differently without any warning when passing different types of arguments for the same event.

---

<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:** [September 18, 2024, 1:33am UTC](https://qa.fmod.com/t/fmodunity-runtimemanager-createinstance-string-path-does-not-work-after-upgrade-from-2-02-19-to-2-02-20/22087/6 "2024-09-18T01:33:15Z")

</div>

That makes sense to me, thanks for clarifying!
