Game.Effects.MixerGroup
Assembly: Assembly-CSharp
Namespace: Game.Effects
Type: enum
Base: System.Enum
Summary: MixerGroup is an enumeration that represents named audio mixer groups used by the game's audio system. Each value corresponds to a logical category for routing or controlling audio (for example UI sounds, ambient sounds, radio, disasters, etc.). Use these enum values when assigning audio to mixer groups, adjusting group volumes, or filtering sounds by category in mods or game code.
Fields
-
None = 0
Represents no mixer group / a default unspecified group. -
Ambient = 1
Ambient sounds (environmental, background ambience). -
Radio = 2
In-game radio/music streams. -
UI = 3
User interface sound effects. -
Menu = 4
Menu-specific audio (distinct from in-game UI). -
World = 6
General world sounds not covered by ambient (e.g., object interaction). -
ServiceBuildings = 7
Sounds related to service buildings (e.g., garbage, power, services). -
AudioGroups = 8
A generic grouping used by the game for certain audio collections (name implies grouped audio). -
Disasters = 9
Sounds associated with disasters and related notifications.
Properties
- (None)
This enum does not define properties.
Constructors
- (None)
Enums do not declare explicit constructors in typical usage.
Methods
- (None)
No methods are defined on this enum.
Usage Example
// Example: assigning a mixer group to a hypothetical sound request API
// (APIs below are illustrative; adapt to the actual audio API exposed by the game)
void PlayUIButtonSound(AudioClip clip)
{
// Pass the MixerGroup enum so the game's audio system routes the clip correctly
SoundManager.PlayOneShot(clip, group: Game.Effects.MixerGroup.UI);
}
// Example: comparing / switching behavior based on group
void HandleSound(Game.Effects.MixerGroup group)
{
switch (group)
{
case Game.Effects.MixerGroup.Radio:
// treat radio-level sounds differently
break;
case Game.Effects.MixerGroup.Disasters:
// prioritize disaster alerts
break;
default:
// default handling
break;
}
}
// Example: converting from integer (e.g., saved data) to MixerGroup safely
int savedValue = 2;
if (Enum.IsDefined(typeof(Game.Effects.MixerGroup), savedValue))
{
var group = (Game.Effects.MixerGroup)savedValue;
// use group...
}
else
{
var group = Game.Effects.MixerGroup.None;
// fallback...
}