Hi, I am seeing the errors below when playing any sound attached to a Game Object, 2D or 3D. The sounds play fine but they spam these errors in the console.
I’ve reproduced this on FMOD 2.01.11 in a clean Unity project 2019.4.28.f1 with the most basic code possible (below). API Error Logging is enabled.
I noticed this similar post, but I’m not sure if this should have been fixed on 2.01.11 or if it’s a separate issue?
using FMODUnity;
using UnityEngine;
public class PlaySoundOnAnimationEvent : MonoBehaviour
{
[EventRef] public string fmodEventPath;
public void PlayOneShotSound()
{
RuntimeManager.PlayOneShotAttached(fmodEventPath, gameObject);
}
}
I have reproduced the error using your code and it appears that attached instances are still affected by this bug, so RuntimeManager.PlayOneShotAttached will still throw errors when API Error Logging is enabled.
Hopefully we can get a patch out quickly, in the meantime if you urgently need to use attached instances with API Error Logging enabled you can make the following change to “<project_name>/Plugins/FMOD/src/Runtime/RuntimeManager.cs” lines 476-481:
Replace this