Course contentsShow
← Unity Game Development
Lesson 344 of 8285. UI and Audio SystemsFree lesson

Routing Audio Through Custom Send Groups

Learners will configure send and return channels to apply shared environmental effects efficiently across multiple audio sources within the mixer hierarchy.

In this lesson, you will learn how to use Send groups to apply a single, shared environmental effect to multiple audio sources without taxing your CPU by creating individual effect instances for each one.

The Concept of Shared Processing

Imagine your game has ten different footsteps, three weapon fires, and five ambient object sounds that all happen in a large cave. If you added a "Reverb" effect to every single one of those Audio Mixer Groups, you would be wasting massive amounts of processing power.

Instead, we use Send and Return routing. By using a "Send," we take a portion of the signal from our individual sound groups and pass it to a dedicated "Reverb Return" group. This way, all your sounds share one common effect instance, ensuring a consistent acoustic space while remaining highly optimized.

Setting Up the Routing

To configure this, follow these steps in the Audio Mixer window:

  1. Create the Return Group: Right-click your Master group and select "Add Child Group." Name it "ReverbReturn."
  2. Add the Effect: Select "ReverbReturn," and in the Inspector, click "Add Effect" to add an Audio Reverb Filter.
  3. Configure the Send: Select an individual sound group (like "Footsteps"). In the Inspector, click "Add Effect" and choose Send.
  4. Link the Routing: In the Send effect settings, set the Receive dropdown to your "ReverbReturn" group. Use the Send Level slider to determine how much of that specific sound is "wet" (processed by the reverb).

By adjusting the Send Level on a per-group basis, you can control how much echo each sound receives. For example, a player's footsteps might have a higher send level than a distant ambient object, creating a realistic depth perception without redundant processing.

// Example: Dynamically adjusting the send level via script
public AudioMixer audioMixer;

void SetCaveReverb(float level) {
    // We map the Send Level exposed parameter to the mixer
    audioMixer.SetFloat("FootstepSendLevel", level);
}

Key Takeaway: Routing audio through custom Send groups allows you to consolidate complex effects into a single shared processing channel, keeping your game's audio performance smooth and memory-efficient.