Skip to content

Sounds

To play a sound, you need an object (actor) that can function as a sound emitter. This means that the object must have the SoundEmitter property. For example, all trucks have this property (you might need to open the full view in the Inspector to see it):

Tip

You can also add the SoundEmitter property to an arbitrary object.

There are three main ways to play a sound in the scene:

  • Play Sound node: using this blueprint node, you can play any sound from an actor that has the SoundEmitter property.
  • Special sound actor: this is a special object that can be added to a scene. The sound will be played from the actor's position when the actor is initialized at the start of the scene. The actor will try to play the sound as a 3D sound: if a sound has attenuation settings set in Wwise, they will be applied. A sound actor has the SoundEmitter property by default. 
  • Domain sound actor: this is a special object that can be added to a scene. The sound will start playing when the player enters the domain. This is primarily used for ambient sounds that are played at the same volume at any point inside the domain. A domain actor has the SoundEmitter property by default. 

    Info

    Currently, domain sounds can only be played as 3D sounds: if a sound has attenuation set up in Wwise, it will be applied and the sound will be played from the central point of the domain.

Play sound

Play Sound node

With a Play Sound node, the sound can be played at an arbitrary moment by triggering the node in a blueprint scenario.

To play a sound using a Play Sound node:

  1. Open a blueprint scenario. It can be a scene blueprint scenario or an object scenario.
  2. Add a Play Sound node to the scenario:
  3. Select a sound for the Play Sound node (see Selecting sounds).
  4. The Play Sound node needs an actor (object) to play a sound from. The actor must have the SoundEmitter property. You can pass the actor to the node in two ways:
    • Connect the Actor pin to some other node that has an Actor pin as an exit pin:

      In this example, the Get First Tagged Actor node finds an object with the tag emit. You can add arbitrary tags to any object in the scene: in this example, we have added the tag to an actor with a SoundEmitter property.

      OR
    • If the blueprint is attached to an object that has a SoundEmitter property, the Play Sound node can use this object as the source of the sound. The Actor pin value should be set to <OWNER>:

      See an example of using this approach in the Add sounds section of the tutorial.
  5. To trigger the Play Sound node, the execution flow must be passed to it at some point in time. Connect the Play pin to some other node that has a flow pin as an exit pin:

    In this example, we have connected the Play Sound node to the On Enabled node. When the target object becomes enabled (for example, a building we set up in the example scene), a sound will be played.

Sound actor

With a special sound actor, the sound will be played from the actor's position when the actor is initialized at the start of the scene. This actor does not have any geometry and is not visible in the scene. The actor will try to play the sound as a 3D-sound: if a sound attenuation has been set in Wwise, it will be applied.
To play a sound using a sound actor:

  1. Add a sound_actor_full prefab to the scene.
  2. Open the Prop Initial Sound section in the Inspector panel and click + next to the Initial sounds:
  3. Select GameSound as the new entry class:
  4. Select a sound for the sound actor (see Selecting sounds). 

Tip

You can also use a sound actor as the input actor for a Play Sound node: for example, to play a sound in an arbitrary place when some scripting logic is triggered. If you are using this actor in a Play Sound node, you do not need to set up Initial sounds.

See an example of using this approach in the Add sounds section of the tutorial.

Domain sound actor

With a domain sound actor, the sound will start playing when the player enters the domain. This is primarily used for ambient sounds that are played at the same volume at any point inside the domain.

Info

Currently, domain sounds can only be played as 3D sounds: if a sound has attenuation set up in Wwise, it will be applied and the sound will be played from the central point of the domain.

To play a sound using a domain sound actor:

  1. Add a dom_sound_switch_state prefab to the scene.
  2. Open the DomainSound section in the Inspector panel. Select GameSoundDesc and then GameSound next to the Ambient Sound 3d property:
  3. Select a sound for the domain (see Selecting sounds).

Select sound

When choosing a sound you usually see the following interface:

To choose a sound, click ... next to the Sound property and select a sound in the Sounds Browser:

Tip

To preview the sound, click the note icon to the left of the sound name:

Info

There are two main types of built-in sounds in the game: one-shot sounds and looped sounds. Looped sounds have loopamb, or start/stop in their names.

Only built-in sounds (except for voice-over lines) and custom sounds created using Wwise are available in the menu described above. If you want to play a voice-over line or a sound created without Wwise, you need to add an External Source:

  1. (If you are using the Play Sound node) Click :

    Expand the Sound property:
  2. Click + next to External sources:
  3. Click ... next to the first entry and select a sound:
  4. In the correspoinding Sound property, select a sound that supports External Sources:

    Examples of such sounds:

    • ext_dummy_2d — a 2D-sound that sounds the same regardless of the distance between the player and the sound actor.
    • ext_dummy_3d_lin_100m — a 3D-sound that linearly becomes quiter the further away the player moves from the sound actor until the player is 100 meters aways from the sount actor.