I’ve seen a few people have this problem on the forum that have fixed it with insuring the Main Camera has the FMOD listener component attached to it however I am still receiving these errors with it attached. I have also made sure FMOD, unity and the integration package are all up to date and started the process repeatedly again from scratch. I still receive these error codes:

NullReferenceException: Object reference not set to an instance of an object
FMOD_StudioSystem.PlayOneShot (System.String path, Vector3 position, Single volume) (at Assets/Plugins/FMOD/FMOD_StudioSystem.cs:225)
FMOD_StudioSystem.PlayOneShot (System.String path, Vector3 position) (at Assets/Plugins/FMOD/FMOD_StudioSystem.cs:217)
PlayerController.OnTriggerEnter (UnityEngine.Collider other) (at Assets/Scripts/PlayerController.cs:56)

Any help would be much appreciated :)

  • You must to post comments
Best Answer

This is happening because the event path you’re passing into PlayOneShot() doesn’t correspond to any event.

In the next release we’ll improve the logging and stop the crashing.

  • Nicholas Wilcox
    Yes, don't call PlayOneShot() with event names that don't exist. You can check if GetEvent() returns non-null to see if the event path exists.
  • Matt Lightbound
    Thanks very much for the info, i have worked round it now :)
  • Andy Frech
    Hi Matt, would you mind mentioning what you did to fix the error? I'm having the exact same one. It sounds like I just have the even name incorrect, but I've checked it over and over without finding anything wrong. Cheers
  • Nicholas Wilcox
    Hi Andy, If you grab version 1.05.06 of the integration the issue reported by Matt is fixed. If you're still having problems then it's a separate issue and please start a new topic.
  • Andy Frech
    Thanks Nicholas, I will do that!
Showing 1 result
Your Answer

Please first to submit.