Issue with Parameters

Hello everyone, I’m super new on this FMOD world and I’m trying to implement something really simple that is working on FMOD STUDIO but on Unity it’s not working.

The songs on my game have layers of instruments, and I want to fade out the volume level of a specific instrument at a certain point.

I’m trying to use a Volume Parameter and trigger it by code.

On FMOD the parameter works great, I drag the slider up and down and song goes from mute to 0db (-1f->1f). But on Unity, when I toggle the slider with the game running the values between -1f and 0f are all the same.

-1f = 0f on fmod studio

0f - of on fmod studio

and from 0f to 1f it’s working great.

I think it’s something really simple to do but I’m messing up somehow lol

Here’s the simple script:

public class FMODParameter : MonoBehaviour {

    private FMOD.Studio.EventInstance instance;

    [FMODUnity.EventRef]
    public string fmodEvent;

    [SerializeField] [Range(-1f, 1f)]
    private float volume;

    private void Start(){
        instance = FMODUnity.RuntimeManager.CreateInstance(fmodEvent);
        instance.start();
    }

    private void Update(){
        instance.setParameterByName("Volume", volume);
    }

And here’s my FMOD STUDIO screenshot

Thank you in advance!

Hi,
Maybe try recording a profiler session with Live Update enabled, to see what’s going on. You’ll be able to check the API calls being passed.

Thank you, I’ll try that!

I’ll second @Alcibiade’s suggestion of running the profiler and checking the value of your parameter over time in the ‘Lifespans’ graph- more information on the specifics are in the docs. Otherwise, I found parameters behaved as expected in the latest version of FMOD- if you could please let me know what version of FMOD you are using I’ll double check just in case there’s a bug there.

After failing to make it work on unity for 4 hours, I implemented in another way and it’s working fine now. Thanks!