Local Parameter not working in Build but working in Editor - Unity, Windows Desktop

Hello,

Using the profiler, I’ve determined that a Local parameter is not functioning in our game’s Windows Desktop build, but it is functioning when running in the editor.

Build

vs

Editor

The parameter is set by code which calculates the total number of combat units/instances in the camera radius and scales the “CombatIntensity” parameter accordingly.

    /// <summary>
    /// Set CombatIntensity PARAMETER of this fmod event based on num instances of it playing 
    /// </summary>
    /// <param name="geoaudioCountsKey"></param>
    /// <param name="fmodEvent"></param>
    public void SetCombatIntensity(string geoaudioCountsKey, FMOD.Studio.EventInstance fmodEvent)
    {
        // Set combat intensity based on count
        if (geoaudioCountsKey.Contains("Combat"))
        {
            // START AT 0
            int numInstancesPlaying = geoaudioCounts[geoaudioCountsKey];
            float intensity = Mathf.Clamp((numInstancesPlaying - 1) * 0.25f, 0f, 1f);
            fmodEvent.setParameterByName("CombatIntensity", intensity);
            //Debug.Log("CombatIntensity " + geoaudioCountsKey + " " + intensity + " num instances " + numInstancesPlaying);
        }
    }

    public void EnteredGeoAudio(GeoAudio ga)
    {
        if (activeGeoaudio.Contains(ga))
            return;
        activeGeoaudio.Add(ga);
        ga.camera_within_our_bounds = true;

        // Increase instances of this geoaudio present
        if (!geoaudioCounts.ContainsKey(ga.transform.name))
            geoaudioCounts[ga.transform.name] = 0;
        geoaudioCounts[ga.transform.name]++;

        // Play sound in FMOD
        if (!ga.fmodEvent.IsNull)
        {
            FMOD.Studio.EventInstance fmodEvent = AudioManager.audio_manager.PlayPersistentFMODAudio(ga.fmodEvent);
            SetCombatIntensity(ga.transform.name, fmodEvent);
        }

We are not encountering any issues with other parameters in the build. The CombatIntensity parameter does happen to be the only Local parameter we are setting by code.

Each instance of a combat unit’s related FMOD Event uses the CombatIntensity parameter on a number of automations including track volumes, fx properties, and Scatterer Instrument spawn rates.

Using FMOD v 2.02.23 and Unity 2022.3.22f1
Any help would be very much appreciated.

Thanks!

Is there anything in the output log that may give any clues?
You may need to increase the logging level, or you could add result checks to your code for debugging.
eg.

FMOD_RESULT result = fmodEvent.setParameterByName(...);
if (result != FMOD_OK)
    Debug.Log("setParameterByName result = " + result);

Unfortunately no clues in the logs. No errors. Still confusingly works in the Editor but not in Builds. Confirmed just today with Live Update.

I’ve attached a screenshot of my settings for the parameter in question:

For the sake of troubleshooting, I’ve toggled “Exposed recursively via event instruments” on and off and saw no difference.

Could it be an issue that parent events and the event instruments contained within are both utilizing this parameter? Again, works in Editor as expected so I don’t expect there to be a functional issue with the way the parameter is being used.

Is there anything else I could do/share to help troubleshoot? At a bit of a loss.

Thanks

‘Exposed recursively via event instruments’ should only be required if you are using nested/referenced events and you want to be able to set the parameter on the child event using eventInstance::setParameter.... Without that option enabled, you are relying on the event to control it’s own parameters, even if they have the same name as parameters in the parent.

Have you also tried the Enable API error logging option in the FMOD-Unity settings?