When trying to have the audio paused when the game is paused everything works but it seems like the velocity on parameters isn’t pausing causing the parameter to hit zero during the pause.
Hi,
Thanks for bringing this to our attention. Could I grab some more info:
- The integration version
- Unity version
- Could I grab some reproduction steps
Thanks
Appreciate the response,
Integration:
Unity Version:
Here’s how the event is played
Event Played
EventInstance eventInstance = AudioManager.instance.PlayEventInstance(“reload”, gameObject);
eventInstance.setParameterByName(“ReloadTime”, reloadTime);
eventInstance.start();
eventInstance.release();
And this is what “AudioManager.instance.PlayEventInstance” runs
PlayEventInstance
public EventInstance PlayEventInstance(string sound, GameObject inputGO)
{
EventInstance eventInstance = CreateInstance(GetEventReference(sound));
RuntimeManager.AttachInstanceToGameObject(eventInstance, inputGO);
eventInstance.set3DAttributes(inputGO.To3DAttributes());
return eventInstance;
}
I paused the bus around were the beginning of the instance is played but shown in the session viewer the parameter continues to decrease while the bus is paused
Unless I’m misunderstanding something I’d expect the velocity of the parameter to not effect the parameter while the bus is paused.
Thank you for the code and the images.
Unfortuantely, I was not able to reproduce the behaviour by pausing the master channel group and the event instance itself:
How are you pausing the bus? Is the parameter being set instantly or does it have velocity?
Could you please try:
EventInstance eventInstance = AudioManager.instance.PlayEventInstance(“reload”, gameObject);
eventInstance.start();
eventInstance.release();
eventInstance.setParameterByName(“ReloadTime”, reloadTime);