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!