FMOD Spatializer Plugin - eventDescription.getMinMaxDistance returns wrong values in Unity on override in Studio

used FMOD Studio & Unity Integration Version: 2.02.07

I do realize this issue might be somewhat connect to this:
How to get spatializer min max distance override in code

The Fmod Unity Integration will return wrong values for eventDescription.getMinMaxDistance if override is used on Spatializer plugin in Studio under certain cirumstances

Steps to reproduce:

  • Create event
  • Place spatializer on event master
  • set override on spatializer to true, change max distance to some other value (e.g. 200)

if then reading out minMaxDistance from eventdescription or eventinstance in unity, notice that old value is still shown.
(Attenuation will work correctly in terms of hearing-range, but the shown value is wrong)

If you go back to fmod, and turn override off then on again on spatializer directly when event is selected, and build bank anew, then max attenuation will be shown correctly.
HOWEVER, this workaround does not work if i use presets and i go to preset and turn off/on override. I need to specifially go to the event and turn it off/on there.

Having the wrong value sent means i cannot possibly start / stop sounds based on distance by code. (only by using the workaround mentioned in other thread which means instance needs to be playing, etc.)

Thank you for reporting this issue, I have reproduced it as described. I have passed this on to the development team to fix in a future release. In the meantime, would it be possible for you to use the workaround in the linked forum post to batch override the min and max distance of events at build time?

yeah, kind of - we use the DSP getter method as we use dynamic camera distances, thus we have automated the max attenuation.
Looking forward to a fix!

+1 for wanting a proper API solution to this problem

hello Jeff, has this issue been adressed in the meantime?

After discussing with the Dev team they have told me that EventDescription::getMinMaxDistance not returning the spatializer-overriden value is intended behavior.

The intention of this change in behavior was to make min/max distance a property of the event, and for spatializers to read the event’s min/max distance. Spatializers can choose to ignore the event’s min/max distance, but this will not override the event’s min/max distance, which is what is being retrieved with EventDescription::getMinMaxDistance. There is a change planned for an upcoming release to better reflect this in FMOD Studio by no longer hiding the Min & Max Distance slider in the Event Macros.

Instead of modifying EventDescription::getMinMaxDistance, I have suggested to the Dev team to reintroduce the 2.01 API methods EventDescription::getMaximumDistance and EventDescription::getMinimumDistance, which search for the highest and lowest spatializer values respectively, which might be a better solution as it will preserve the meaning behind EventDescription::getMinMaxDistance, but still allow you to get the overriden min/max values from an overriding spatializer when an event isn’t playing.

Any ETA for the EventDescription::getMaximumDistance and EventDescription::getMinimumDistance functions? Your message was written in April and now it’s October, but the functions still haven’t been reintroduced.

No ETA yet but thanks for registering your interest in this issue.