Hello there!
I have AC version 1.55a, with unity version 5.5.1f1 (64bit)
I have a Mixer for my game, which in turn has a bunch of groups (Narrator, Ambient, SFX, Dialogue, etc).
I want to be able to control each of the groups volumes via the Options Menu (create new sliders for each category and control while the game is paused). So I wanted to ask if that was possible in AC.
I tried doing this. I set the audio settings in the settings tab of the AC Game Editor to Audio Mixers groups. I referenced the mixer's groups I wanted to control, and I exposed the groups attenuation variables so that they have the exact same name that appears in the audio setting, below the reference for the mixer groups.
Yet in the menu tab, when trying to set the slider to affect the Audio Mixer Groups, I still only get the option to affect the enums groups (SFX, speech, music), and when playing the game, the sliders seem to have no effect over the groups volume. Also, I was wondering if I can go to enum.cs and create new categories (or have the option to have more than just three mixer groups to control in the audio settings).
So if anybody knows what the best solution here is i'd really appreciate it!
Thanks in advance!
Comments
You can, however, create custom options by linking variables to Options Data - see this tutorial. Following the same principle:
1) Link a Float variable to Options Data
2) Write a new custom Action that changes the volume of the appropriate Mixer Group to the value of this variable (see the scripting guide's front page on how to read a variable's value). Sounds with custom Mixer Groups should have their Sound type set to Other so that they're not overridden by SFX/Speech/Music
3) Create a new Slider Menu element that is used to control the value of this variable
4) Place your custom Action in an ActionList that runs when the Slider's value is changed
5) Place your custom Action in an ActionList that runs when your game begins (top of the Settings Manager).
To expose the mixer specifically, write:
Mixer = (AudioMixer) EditorGUILayout.ObjectField ("Mixer:", Mixer, typeof (AudioMixer), false);
I can't recreate the issue, but does it work if you set a specific camera to switch to, as opposed to "last gameplay"?
Be aware that an alternative way to do this would be to precede both Actions with an Engine: Run in parallel Action that can be used to begin both the Camera: Switch and the Dialogue: Play speech Action simultaneously. You can then check Wait until finish? on the Camera: Switch (if desired) without it affecting the timer of the other.