Need to create an Editor tool to migrate EventRef to EventReference

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?


I think I found the way.