Hi, first post here. Sorry if I’m doing it wrong 
I’m trying to integrate Fmod in a unity project. The Unity version is 2022.3.2f1 and the Fmod version is 2.02.21.
If I want to play a oneshot I can do so by calling the path directly with a string as such:
FMODUnity.RuntimeManager.PlayOneShot("event:/Cheese/Pickup_Cheese");
However, if I first declare an eventReference variable and try to reference it in PlayOneShot function as below, it doesn’t play any sound and I get a warning in the unity console.
This is what I wan’t to do (let’s say I want to play the sound on start):
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FMODUnity;
public class PickupToCargo : MonoBehaviour, ISpawnable
{
public CargoContent cargoContent;
public float amount = 0.2f;
CargoHold targetContainer;
public float timeToPickup = 0.5f;
UICountdown currentCounter;
public delegate void OnPickup();
public OnPickup onPickup;
public bool spawnRandomRotation = true;
public bool shouldDespawn;
// Audio
[SerializeField] private EventReference cheeseCollectedSound;
private void Start()
{
FMODUnity.RuntimeManager.PlayOneShot(cheeseCollectedSound);
}
}
Instead of playing a sound, I get the following errors in console:
“[FMOD] ObjectLookup::get : Lookup failed for EventModel: {00000000-0000-0000-0000-000000000000}”
and
“[FMOD] Event not found: {00000000-0000-0000-0000-000000000000} ()
UnityEngine.Debug:LogWarning (object)”
Do you have any idea what is wrong, or what I am doing wrong?
Hi,
What version of the FMOD integration are you using?
Based on the error messages, the issue could be caused by the event reference settings in the inspector.
Could I please get a screenshot of your Unity project’s Event Reference? The ‘Cheese Collected Sound’ reference can be set either by typing in the event’s path or by using the magnifying glass.

Hope this helps!
Good news! I loaded another scene, and then it started working. Now it also works in the original scene.
Just to answer your questions however:
I had already chosen the event in the inspector. Even though I could see the event in the inspector, it still gave me the message that the event wasn’t found.
I thought the versions of FMOD Studio and FMOD for Unity were the exact same. Now that I double check, I can see that I am using FMOD Studio version 2.02.22 and FMOD for Unity version 2.02.21. I didn’t notice because it showed 2.02 and 2.02 in the highlights on the download page.
I don’t know if that could be an issue further down the line, or if it isn’t a problem. For the moment it seems to be working as intended. Would you suggest I change one?
Thanks for the help!
Good to hear it is solved, and thank you for sharing the solution!
Different minor versions are fine, e.g. 2.02.XX, as these mainly contain bug fixes and smaller workflow improvements. You can read more about the versioning here: FMOD Studio | Glossary - Version
Changing versions close to release, either minor or major, is not recommended.
Actually, i still get a similar warning when I store the event using FMODUnity.EventReference and try to use it when creating a new instance of an event. The sound does play, but for some reason i get the following errors:
FMOD] ObjectLookup::get : Lookup failed for EventModel: {00000000-0000-0000-0000-000000000000}
UnityEngine.Debug:LogWarning (object)
FMODUnity.RuntimeUtils:DebugLogWarning (string) (at Assets/Plugins/FMOD/src/RuntimeUtils.cs:564)
FMODUnity.RuntimeManager:DEBUG_CALLBACK (FMOD.DEBUG_FLAGS,intptr,int,intptr,intptr) (at Assets/Plugins/FMOD/src/RuntimeManager.cs:108)
FMOD.Studio.System:getEventByID (FMOD.GUID,FMOD.Studio.EventDescription&) (at Assets/Plugins/FMOD/src/fmod_studio.cs:464)
FMODUnity.RuntimeManager:GetEventDescription (FMOD.GUID) (at Assets/Plugins/FMOD/src/RuntimeManager.cs:1309)
FMODUnity.RuntimeManager:CreateInstance (FMOD.GUID) (at Assets/Plugins/FMOD/src/RuntimeManager.cs:1188)
FMODUnity.RuntimeManager:CreateInstance (FMODUnity.EventReference) (at Assets/Plugins/FMOD/src/RuntimeManager.cs:1165)
AnimationController:Start () (at Assets/Scripts/GUI/AnimationController.cs:21)
and
EventNotFoundException: [FMOD] Event not found: {00000000-0000-0000-0000-000000000000} ()
FMODUnity.RuntimeManager.CreateInstance (FMODUnity.EventReference eventReference) (at Assets/Plugins/FMOD/src/RuntimeManager.cs:1169)
AnimationController.Start () (at Assets/Scripts/GUI/AnimationController.cs:21)
This is the code i’m using:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FMODUnity;
using FMOD.Studio;
public class AnimationController : MonoBehaviour
{
public Animator animator;
float targetRotation = 0;
float rollSpeed = 3;
public ParticleSystem engine;
//Audio
[SerializeField] private FMODUnity.EventReference thrustSoundEvent;
private FMOD.Studio.EventInstance thrustSoundInstance;
private void Start()
{
thrustSoundInstance = FMODUnity.RuntimeManager.CreateInstance(thrustSoundEvent);
}
public void SetEngine(bool on)
{
if (engineOn != on)
{
if (on)
{
OnEngineStart();
}
else OnEngineCutoff();
}
engineOn = on;
animator.SetBool("Thrust", on);
{
void OnEngineStart()
{
thrustSoundInstance.start();
{
}
void OnEngineCutoff()
{
thrustSoundInstance.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
{
I don’t get the message however, use reference the path directly with a string, as such:
thrustSoundInstance = FMODUnity.RuntimeManager.CreateInstance(event:/PlayerSounds/Player_Rocket_Engine);
What could be the cause of this? It seems to have some thing to do with FMODUnity.EventReference.
Any help would be greatly appreciated!
HI, Thanks for providing the code! Since Connor is away, I will be continuing the investigation.
Unfortunately, I was not able to reproduce the issue with the code you provided.
Could you please provide a Unity log where you run into the issue with your FMOD Logging Level set to “Log” Unity Integration | 8. Settings | 8.2 Initialization | 8.2.1 Logging Level
Hi,
I came across the same issue today, and as DanielClifton suggested, this seems to have something to do with FMODUnity.EventReference and the way it is serialized in the UnityEditor.
At first my code was looking like this :
[SerializeField] private EventReference mySound;
RuntimeManager.PlayOneShot(mySound);
in the editor, there was some problem when setting the event’s path :
I could search and select the event to reference (with the magnifying glass icon) but when clicking it, no path got written in the editor field. I worked around this by selecting the event through the “folder” icon and dragging it in the field (manually typing the event path works too), but then got the errors mentioned in the first post when testing in game.
What seemed to fix the issue :
Simply changing the EventReference from private to public seemed to work :
public EventReference mySound;
RuntimeManager.PlayOneShot(mySound);
From there, referencing the event with the magnifying glass icon worked properly and everything worked fine in game. Afterwards, I could even change the reference back to private and it still worked.
So yeah, this seems to be a problem with the way FMODUnity serializes EventReference when they are privates. However, I tried to methodically reproduce this bug after writing this post and couldn’t properly do it… maybe other factors are coming into account for the issue, but I don’t know which ones.
Hi,
Thank you for sharing your workaround and the additional information!
I have not been able to reproduce this on my end either.
In principle, [SerializeField] private EventReference should be valid, so changing it to public should not normally be required. The fact that this caused the picker to start writing the reference correctly makes this look like an editor/serialized-state issue.
If you manage to reproduce it consistently, could you please share your Unity version, FMOD Unity integration version?
So the issue came back today!
This time my EventReference was public, and changing it to [SerializeField] private (or the opposite, private to public) didn’t help.
The precise steps to reproduce are still unclear though… not shure if that is relevant, but I was trying to serialize an event in a ScriptableObject. When trying to reproduce the issue on a classic MonoBehaviour script, the serialization seemed to work just fine.
My Unity version is 6000.3.8f1, and my FMOD integration version is 2.03.13
Thank you for the additional information.
I have tested this using Unity 6000.3.8f1 and FMOD Unity integration 2.03.13 with an EventReference serialized in a ScriptableObject, but I have not been able to reproduce the issue so far.
Could you please share the ScriptableObject class containing the EventReference field? It would also be useful to know whether you are using Unity’s default Inspector or any custom editor/property drawer.
As a quick check, when the issue occurs, does selecting FMOD > Refresh Banks in Unity make any difference?