I’ve been having issues with playing a sound using FMODUnity.RuntimeManager.PlayOneShotAttached.
Using this method I often get the following warning, in combination with the sound not playing:
"FMOD Studio: Instance of Event event:/SFX/Destructables/wood_destruction has not had EventInstance.set3DAttributes() called on it yet!
FMODUnity.RuntimeManager:Update() (at Assets/Plugins/FMOD/RuntimeManager.cs:350)
Any idea what might be the cause of this? I have not yet been able to determine the exact cause as this doesn’t seem to be the case in all situations where I use the method.
Additionally I tried changing the function a little bit:
public static void PlayOneShotAttached(Guid guid, GameObject gameObject)
var instance = CreateInstance(guid);
AttachInstanceToGameObject(instance, gameObject.transform, gameObject.GetComponent());
instance.set3DAttributes(FMODUnity.RuntimeUtils.To3DAttributes(gameObject.transform)); //What I added
And that seems to fix the problem but I’m not sure of this is the correct way to work around this or if this would cause any other issues.
Some feedback and help would be greatly appreciated!