Is there a way of setting the fade time on getbus.setmute? I’d like to avoid a coroutine if I can, and using an ADSR doesn’t seem to work.
Hi,
To implement a smooth fade without using coroutines or ADSR, you could consider adding automation to the fader of the bus in the mixer with a slow seek speed applied to the parameter.
The detailed process would be listed below:
- Go to Windows > Mixer, In the Mixing Desk, select target bus and right click to add automation to its fader’s volume.
- Create a global parameter(.e.g BusMuteIndex in this case) with initial value set to 1, add the curve to the automation of the fader’s volume and adjust the curve.
- Go to Windows>Preset Browser, select BusMuteIndex and adjust the
Seek Speed
- In your C# script, you could then call
RuntimeManager.StudioSystem.setParameterByName("BusMuteIndex", 0);
to smoothly mute the bus and callRuntimeManager.StudioSystem.setParameterByName("BusMuteIndex", 1);
to smoothly unmute the bus in this case.
Hope this helps, let me know if you have any questions.
1 Like
Thanks @li_fmod this is an elegant solution.
1 Like