Can't get EventReference to show up in v 2.02

Hi, I’ve recently started using FMOD in my Unity game, and I’m very excited about the power that is possible with instead of stock Unity audio.
However, after installing FMOD v 2.02 package in Unity 2020.3.14 (I think that version should work right?) I ran into a problem.

In my script, I want to trigger an event.
I tried to expose an event like the script API example said.
Like this: public FMODUnity.EventReference MyEvent;
However, the full EventReference is not possible, only the older/obsolete form of “EventRef”.
How do I get the new version to properly show up? Sorry, I know it’s a newbie question, but I’ve been stuck on this most of the day.
-Nathan

Hi,

Excited to have you with us!

In the FMOD Toolbar menu could I get a screenshot of your About Integration
image

If you check the StudioEventEmitter.cs script on line 11 do you see public EventReference EventReference;

Thanks

image
Here is my about integration screenshot.

Uh oh, very simple user error on my part.
Sorry for the confusion!
Here is what happened.
I started looking at “Scripting Examples, Basic” but in version 2.0.0.
Then I got the “obsolete” message in my code.
So on the website I changed the code sample over to 2.0.2 (which is what I was already using but didn’t realize it).
However, I kept trying to use the [FMODUnity.EventReference] style format! Which is not needed any more in 2.0.2. I can simply use “public FMODUnity.EventReference audioEvent;”.
So it’s all fixed and working!
Thank you!

1 Like

Hi,

Good to hear it is working and thank you for sharing the solution.