Skip to main content
Skip table of contents

Play Audio

A Play Audio action is exactly what the name says, it plays an Audio Source with whatever clip is inside it. This can be useful to give the player Audio feedback after or before a step, such as hiss noise after a valve turn or a lunch alarm after the work has been partly completed.

An Alarm audio being played by the Play Audio Action

Setup

The Play Audio Action Node

The volume will control how loud the audio will be.

Spatial blend will make the audio be mono or stereo.

Play from location will either play the sound at the audio source position when on or play at the players location when off.

Skip on step complete will skip the rest of the Audio clip once the step has been completed.

Follow these steps to set up a new Highlighted Object Action.

  1. Start with an empty game object.

  2. Attach a “Guid Component” script.

  3. Attach a “Audio Source” component.

  4. Make sure the audio source is set to not play on awake.

  5. Attach a chosen audio clip to the audio source.

  6. Open a graph.

  7. Right click and Create a new Play Audio Action (Actions → Play Audio).

  8. Reference the Audio Source we made in a previous step.

An Audio source with our chosen clip that we reference in the graph.

 

That's it. Now when a the action is called the Audio source will play the audio clip.

For more information on the other inputs and outputs found on this node see Actions

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.