Can't play One Shot: "ErrorLookup failed for EventModel: {00000000-0000-0000-0000-000000000000}"

Hi, first post here. Sorry if I’m doing it wrong :slight_smile:

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.
image

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!

1 Like

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