I know this issue has been raised in earlier versions. I have found a solution, but would like to know, if it really is a solution or whether the documentation for v. 2.03 has not been updated yet.
I tried to serialize a field for my FMOD event path in the Unity Inspector. As described in the current documentation, I used:
public FMODUnity.EventReference variableName;
I then got the error that FMODUnity.EventReference is missing from FMODUnity (CS0234). I solved that error by using:
It works now, but I’m confused (total beginner here). I can’t find FMODUnity.EventRef in the FMOD Unity Scripting documentation on the website. Is that actually the solution?
This is my FMOD Integration version: 2.03.08
Thank you for your help. I might have overlooked something basic; in that case, please excuse my inexperience.
Could I please confirm the exact version number of the FMOD Unity integration you’re using? You can find the information by navigating to FMOD => About Integration.
Also, what version of Unity are you currently working with?
EventRef was made obsolete in FMOD 2.02, In FMOD Unity Integration 2.02 and above, the correct and fully supported way to reference FMOD events in Unity scripts is:
public FMODUnity.EventReference eventPath;
If you’re still encountering the CS0234 error when using EventReference, could you please double check the following:
Your FMOD Unity integration is correctly imported.
You’re using Unity 2020+ (some older versions might have trouble serializing newer structs)
You haven’t renamed or moved FMOD folders in a way that breaks namespace resolution
I didn’t have any errors when downloading and importing the integration package. Is there any other way I can double check, whether the import was free of errors?
My Unity Version: 2022.3.0f1
I did not touch the FMOD folders in Unity after the import.