Issue with retrieving guid with multiple prefabs in the scene

My work is in the process of implementing multiplayer into our project. These are already completed projects, and for a bit more background, these are vehicle simulators, where the player controls the vehicle. The vehicle sounds are all setup as part of the vehicle prefab.

When we have just 1 vehicle in the scene, the sounds work fine. If we have more than one vehicle though, we start getting errors as soon as the sounds should start firing (for example, I start the vehicle and the vehicle engine sounds should play, now I’m getting an error every frame). The error is saying the FMOD Studio event is not found and gives the event name. I stepped through the code and found the error to be in the function in the picture. For some reason, the line where result gets set is coming back with a bad result, even though it works fine with just one vehicle in the scene. The other vehicles do not have any sound objects on them. And there are no other sound objects in the scene. Does anyone have any input on what could be wrong here?

Hi,

What version of FMOD are you using?

Could I grab some info

  1. When the second vehicle is added to the scene is this over multiplayer or is it in the local scene?
  2. Are the events for both engines in the same bank?
  3. Are all banks loaded at the beginning of the scene or are you controlling when different banks are loaded?
  4. Could I get a screenshot of the error in the Unit console?

We’re on version 1.08.10

  1. It’s added in the local scene.
  2. The other vehicle does not have any fmod stuff on it, it doesn’t have a bank, or a reference to a bank, or any other fmod components on the prefab.
  3. All banks are loaded at the beginning of the scene.

Hi,

Unfortunately, we no longer support FMOD 1.08.10. Could you please update to 2.02.00, migrating your project is outlined here: FMOD Studio | Advanced Topics - Migrating FMOD Studio Projects. Once updated, could you please confirm you are still experiencing the issue?

Ended up figuring this out. I found an FMOD Studio Bank Loader script tucked away in the wrong spot on the remote prefabs, which was subsequently being removed by a script that strips them at run time. When it stripped them, it forced a call to Unload. Since these vehicles shared a bank, it was unloading the bank used by the players vehicle.

1 Like

Hi,

Thank you for sharing the solution.