# Remove EventReference.Path

**URL:** <https://qa.fmod.com/t/remove-eventreference-path/20829>\
**Category:** Unity\
**Tags:** unity, csharp\
**Created:** [November 1, 2023, 11:05pm UTC](https://qa.fmod.com/t/remove-eventreference-path/20829 "2023-11-01T23:05:38Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhys\_vdw](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/rhys_vdw/32/2454_2.png) [@rhys\_vdw](https://qa.fmod.com/u/rhys_vdw)\
**Post date:** [November 1, 2023, 11:05pm UTC](https://qa.fmod.com/t/remove-eventreference-path/20829/1 "2023-11-01T23:05:38Z")

</div>

Would it be possible to remove `string Path` from `EventReference`?

Storing this path seems to add a whole bunch of confusion/overhead using this scanner tool, but really all we need is a GUID to get the path from FMOD build (for display) or play the audio (at runtime).

I see it’s guarded behind `UNITY_EDITOR` right now. It would be amazing if we could just get rid of this needless functionality entirely and instead rely on the FMOD project to map the GUID to its path in the inspector.

Would it be possible to add something like:

```cs
#if UNITY_EDITOR && !FMOD_DISABLE_EVENT_PATHS
  public string Path;

```

And use that same flag to completely remove the scan tool from the project too?

Ideally `Path` would just be removed entirely, but I’m assuming it’s there for some reason.

## Real-world illustration of problem

**What we have now:**

1. Audio person renames events in FMOD studio.
2. Audio person opens Unity and runs the scanner tool.
3. Pull request is made.
4. Other team members commit changes that reference existing (but renamed) events – theoretically no problem here.
5. Pull request is merged (updating master and forcing these new event references to immediately be stale).
6. Every person on team opens Unity and gets prompted to open the scanner tool resulting in confusion.

Step 2 is unnecessary.  
Step 6 causes delays, duplicated work (scan tool × team size), extra communication “why is this thing opening when I start unity?”, extra training re: FMOD to e.g. artists, designer etc.

**What we could have (without `Path`):**

1. Audio person renames events in FMOD studio.
2. Audio person makes pull request.
3. Pull request merged at any time.

---

<div class="post-metadata">

**Author:** ![rhys\_vdw](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/rhys_vdw/32/2454_2.png) [@rhys\_vdw](https://qa.fmod.com/u/rhys_vdw)\
**Post date:** [November 2, 2023, 2:50am UTC](https://qa.fmod.com/t/remove-eventreference-path/20829/2 "2023-11-02T02:50:23Z")

</div>

Just to bang on about it a bit more… This morning I rebased audio guy’s PR to avoid aforementioned problem. I re-ran the scan tool to sync up the redundant Path fields to make sure nobody would would get prompted to scan… Now I’m getting this message from team mate:

![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/c/c74a0f11a4914791e1b654a793410547f54026f5.png)

The only reason to run the tool is so that it doesn’t prompt you to run it next time, and even that is not working as expected.

---

<div class="post-metadata">

**Author:** ![rhys\_vdw](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/rhys_vdw/32/2454_2.png) [@rhys\_vdw](https://qa.fmod.com/u/rhys_vdw)\
**Post date:** [November 2, 2023, 2:53am UTC](https://qa.fmod.com/t/remove-eventreference-path/20829/3 "2023-11-02T02:53:20Z")

</div>

By the way, I should say I really really appreciate the move from strings to GUIDs (despite abovementioned strangeness). We’re big fans of FMOD. 💖

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [November 8, 2023, 4:24am UTC](https://qa.fmod.com/t/remove-eventreference-path/20829/4 "2023-11-08T04:24:39Z")

</div>

You make a compelling argument; artists and designers shouldn’t have to learn about FMOD every time someone changes the name of an event.

I think we should be able to remove the `Path` property from `EventReference`s, and instead display a cached value from somewhere else. With that, we can update the cached values when banks reload, and allow `Path` to be a reflection of the centralized data without the need to manually run the `EventReferenceUpdater` just to ensure the string value stays up to date.  
I have passed on your suggestion to the Dev team, thank you for bringing this to our attention!

---

<div class="post-metadata">

**Author:** ![rhys\_vdw](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/rhys_vdw/32/2454_2.png) [@rhys\_vdw](https://qa.fmod.com/u/rhys_vdw)\
**Post date:** [November 9, 2023, 2:34am UTC](https://qa.fmod.com/t/remove-eventreference-path/20829/5 "2023-11-09T02:34:33Z")

</div>

Thanks for taking the time to read my suggestion @jeff_fmod. Happy to hear I wasn’t missing something. 💖

> With that, we can update the cached values when banks reload, and allow `Path` to be a reflection of the centralized data without the need to manually run the `EventReferenceUpdater` just to ensure the string value stays up to date.

I think you basically just need the `EventReference` drawer to call `RuntimeManager.GetEventDescription` to get the value to show, and when the value changes it can call `RuntimeManager.PathToGUID(string path)` to set the actual value (although setting the value is usually done via the dropdown anyway, you probably may not need a text input at all).

In the case the bank isn’t loaded or doesn’t exist (or whatever error) just replace the entire property drawer with a warning message telling the user rebuild/configure FMOD.

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [November 13, 2023, 1:06am UTC](https://qa.fmod.com/t/remove-eventreference-path/20829/6 "2023-11-13T01:06:56Z")

</div>

It would be a little more complex than that, just because the `RuntimeManager` as it stands can’t be used inside Editor-only code. We have a separate `FMOD.Studio.System` for use in-Editor (`EditorUtils`), so we would need to implement equivalent methods in that I think.  
In any case, it should be doable, and would be better than the current situation.

---

<div class="post-metadata">

**Author:** ![rhys\_vdw](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/rhys_vdw/32/2454_2.png) [@rhys\_vdw](https://qa.fmod.com/u/rhys_vdw)\
**Post date:** [November 14, 2023, 2:46am UTC](https://qa.fmod.com/t/remove-eventreference-path/20829/7 "2023-11-14T02:46:31Z")

</div>

True, well I’m sure you know how to do it. The `EventReferenceDrawer` is already querying the cache for the event path to print a warning about a mismatched path.

---

<div class="post-metadata">

**Author:** ![JulienK](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JulienK](https://qa.fmod.com/u/JulienK)\
**Post date:** [February 28, 2024, 9:35am UTC](https://qa.fmod.com/t/remove-eventreference-path/20829/8 "2024-02-28T09:35:40Z")

</div>

Any news about this fix? I have the same issue with my team… every time I rename events + scan / execute event references, they spam me about the fmod window 🙂

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [February 28, 2024, 9:50pm UTC](https://qa.fmod.com/t/remove-eventreference-path/20829/9 "2024-02-28T21:50:56Z")

</div>

This feature hasn’t been implemented yet. I have registered your interest in our issue tracker.

---

<div class="post-metadata">

**Author:** ![rhys\_vdw](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/rhys_vdw/32/2454_2.png) [@rhys\_vdw](https://qa.fmod.com/u/rhys_vdw)\
**Post date:** [November 19, 2024, 2:41am UTC](https://qa.fmod.com/t/remove-eventreference-path/20829/10 "2024-11-19T02:41:41Z")

</div>

Yeah, I have the same problem. Or even worse, they will actually run the tool and then be like “i got all these changes”.

---

<div class="post-metadata">

**Author:** ![tzvahdolabs](https://avatars.discourse-cdn.com/v4/letter/t/5f9b8f/32.png) [@tzvahdolabs](https://qa.fmod.com/u/tzvahdolabs)\
**Post date:** [January 31, 2025, 4:10pm UTC](https://qa.fmod.com/t/remove-eventreference-path/20829/11 "2025-01-31T16:10:13Z")

</div>

+1 to interest in this feature’s implementation

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [February 2, 2025, 10:09pm UTC](https://qa.fmod.com/t/remove-eventreference-path/20829/12 "2025-02-02T22:09:03Z")

</div>

I have registered your interest in our issue tracker.
