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
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.
Is there nothing I can do in the mean time then?
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.
Thanks very much for the info, i have worked round it now
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
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.
Thanks Nicholas, I will do that!