Hello,
Is there a way to send automation curve from an fmod event to unity for controlling game parameters?
The only way i found was to create an audio channel with a static sound, automating the level of it and send it to a parameter’s side chain. Then i was able to read the parameter value in unity.
It works, but little expensive in resources if i need to run many instances together.
At the moment that is the only way to get an automated value out of an event. Some built in properties are accessible through EventInstance::getProperty, although those don’t really fit into this purpose.
Using getParameterByIndex is cheaper than using getParameterValue, which uses a string lookup. As long as you already know the index of parameter you need, which you could cache earlier from the EventDescription.
We do have plans to make this easier/cheaper but those changes aren’t currently on the roadmap.
Regarding the side chain method,
I am using a dedicated 1kHz sine wave and automating it’s gain for creating the envelope. This is sent to the parameter’s side chain pre track fader.
If i set the track’s volume to minimum (I don’t want this sound to be a part of the mix), then in the build it doesn’t work (I assume because Fmod knows no sound is coming out so disabling the track).
So what i do is set the volume to -79 dB in order for it to work.
Is theres a way to set the volume to minimum but still force the sound to play?