# Need to create an Editor tool to migrate EventRef to EventReference

**URL:** https://qa.fmod.com/t/need-to-create-an-editor-tool-to-migrate-eventref-to-eventreference/20461
**Category:** Unity
**Tags:** unity, csharp
**Created:** [July 26, 2023, 5:49am UTC](https://qa.fmod.com/t/need-to-create-an-editor-tool-to-migrate-eventref-to-eventreference/20461 "2023-07-26T05:49:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![esteban16108](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@esteban16108](https://qa.fmod.com/u/esteban16108)
#### Post date: [July 26, 2023, 5:49am UTC](https://qa.fmod.com/t/need-to-create-an-editor-tool-to-migrate-eventref-to-eventreference/20461/1 "2023-07-26T05:49:18Z")

</div>

I’m working on this big legacy project and we had to upgrade FMOD to latest 2.2 from 2.01  
So EventRef is not used anymore and instead EventReference should be used.

The problem arises when using the wizard to migrate, it just doesn’t work for this huge project.  
So I was working on a CustomEditor to run with a button in the Inspector to migrate from EventRef to EventReference, since we have too many to do it manually.

My question is how to properly do this in the editor. I tried using the EventReference.Find with the old path from EventRef, the logs show the proper instances being created for EventReference but when assigning to the serialized field it’s not being kept in the prefab… Am I missing something?

Thanks

---

<div class="post-metadata">

### Author: ![esteban16108](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@esteban16108](https://qa.fmod.com/u/esteban16108)
#### Post date: [July 26, 2023, 7:57am UTC](https://qa.fmod.com/t/need-to-create-an-editor-tool-to-migrate-eventref-to-eventreference/20461/2 "2023-07-26T07:57:04Z")

</div>

I think I found the way.

---

<div class="post-metadata">

### Author: ![Dpodz](https://avatars.discourse-cdn.com/v4/letter/d/958977/32.png) [@Dpodz](https://qa.fmod.com/u/Dpodz)
#### Post date: [July 11, 2025, 5:09am UTC](https://qa.fmod.com/t/need-to-create-an-editor-tool-to-migrate-eventref-to-eventreference/20461/3 "2025-07-11T05:09:37Z")

</div>

Bro… You can’t just do that to us…
