Environment Sound System

Overview

ASEnvironmentSoundActor is an actor designed to play environment sounds using the Wwise audio system. This guide will cover creating a Blueprint version of ASEnvironmentSoundActor, placing the actor in a level, configuring its settings, and using the custom gameplay debugger to visualize and debug sound actors.

Console Commands

To view the Attenuation Radius at Editor, enter the following command into the console:  SEnvSound.ShowAtten 1

For Disable enter: SEnvSound.ShowAtten 0

Creating a Blueprint Version of ASEnvironmentSoundActor

  1. Open Unreal Engine Editor.
  2. Right-click in the Content Browser and select Blueprint Class.
  3. In the Pick Parent Class dialog, type ASEnvironmentSoundActor and select it.
  4. Name your Blueprint (e.g., BP_EnvSound_YourName).

Placing ASEnvironmentSoundActor in a Level

  1. Drag and drop the Blueprint (BP_EnvSound_YourName) from the Content Browser into your level.
  2. OR:
    • Open the Place Actors panel.
    • Search for SEnvironmentSoundActor.
    • Drag and drop it directly into the level.

Settings of ASEnvironmentSoundActor

Once placed, you can configure various settings for the ASEnvironmentSoundActor:

  • LoopAkEvent: The Wwise event to loop for the environment sound. This should be set to a valid looping event.
  • bOcclusionAndObstructionEnable: Enable or disable occlusion and obstruction for the sound.
  • OcclusionAndObstructionInterval: The interval in seconds to refresh occlusion and obstruction calculations.

Using the Debugger

To use the gameplay debugger for ASEnvironmentSoundActor, follow these steps:

  1. Activate the Environment Sound Debugger:

    • Press ' (Apostrophe) to open the Gameplay Debugger window.
    • Use Numpad (Num 4) to open the EnvSound category.
      If you don't have Numpad, you can change the buttons here: Project Settings → ( Engine ) Gameplay Debugger → Input

  2. Debugger Features:

    • Total Env Sound Actors: Shows the total number of ASEnvironmentSoundActor instances in the level.
    • Active Env Sound Actors: Shows how many of the sound actors are currently active.
    • Active with Occlusion: Indicates the number of active sound actors with occlusion enabled.
    • Green Point: Represents actors with Active State.
    • Red Point: Represents actors with Deactivated State.
  3. Toggling Debug Visuals:

    • Shift + 1: Toggles the visibility of debug points on each ASEnvironmentSoundActor.
    • Shift + 2: Toggles the drawing of the radius sphere of the sound actor the player is currently looking at.
    • Shift + 3: Toggles the drawing of the radius Info of the sound actor the player is currently looking at.

Example Usage

  1. Placing Actors:

    • Drag ASEnvironmentSoundActor into your level.
    • Set the LoopAkEvent to the desired Wwise event.
    • Enable bOcclusionAndObstructionEnable if occlusion is needed.
  2. Using Debugger:

    • Activate the debugger using ' (Apostrophe).
    • Enable EnvSound debug category.
    • Observe the number of sound actors and their states.
    • Use Shift + 1 / Shift + 2 / Shift + 3 to toggle debug visuals.