[FMOD] Instance of Event...has not had EventInstance.set3DAttributes() called on it yet!

Here’s a doozy…

I just had this on one of my events out of 7. On running, one such warning is generated for each rat bite that spawns this sound. I initialise my audio with an instance but don’t activate it, but position it when called:

instance.setParameterByName(volume, volume);

instance.set3DAttributes(RuntimeUtils.To3DAttributes(pos));
instance.start();

I went into the project to see if there was anything different about that event versus the others. I noticed its minimum distance in the Min/Max distance of the spatialiser was zero where every other event had a min of 1. So I set it to 0.1 and tried again.

Now every event generates this error!

I’ve fixed it by arbitrarily calling Set3DAttribute after I initialise the audio

DB_definition = DB_Sounds.GetEntity(soundName);
instance = RuntimeManager.CreateInstance(DB_definition.f_SoundName);
instance.set3DAttributes(RuntimeUtils.To3DAttributes(Vector3.zero));
instance.getDescription(out desc);
desc.isOneshot(out isLooping);
isLooping = !isLooping;

I don’t know when the warning is generated as the call stack only shows RuntimeManager. It’s not as though the audio was being played without the 3D pos being set., so I don’t understasnd this error or why it propagated onto other events that were working just fine.

¯_(ツ)_/¯

Hi,

Thank you for the codes and the information.

Unfortunately, I was not able to reproduce the issue from my side.

Could I grab the exact integration version you are using?

Would it be possible to share a screenshot of how you set up the event in the project?

Thank you so much for sharing the screenshots.

Spatialized events in FMOD depend on valid 3D attributes to calculate their position, attenuation, and panning. If the 3D attributes are not explicitly set immediately after the instance is initialized—even if the instance is not activated (i.e., not started)—FMOD may trigger a warning.

This happens because FMOD performs internal validations on instances at various points, such as when they are created or manipulated, and it expects 3D attributes to be defined to avoid fallback or undefined behavior.

Setting set3DAttributes with a temporary position (Vector3.zero) right after instance creation is the safest way to avoid these warnings. This ensures FMOD always has valid spatial data to work with.

Could you elaborate this please? As I was still not able to reproduce this issue with a similar setting from my end.

If the issue persists, could you please tick API Error logging and set the Logging Level to “Log” (Unity Integration | 8. Settings | 8.2 Initialization | 8.2.1 Logging Level) to see if you can get more error logs from the console?