VRC_AudioBank

🚧

Deprecated

This component is deprecated. It is not available in the latest VRChat SDK, and is either non-functional, or will no longer receive updates. It may be removed at a later date.

Can used to play sounds easily in a scene

Parameter

Description

Playback Order

The order that Clips should be played in

Playback Style

The playback style that should be used.
One Shot: If new audio is triggered it's not interrupted.
Continuous: New audio interrupts currently playing audio.

Source

The AudioSource that should play the sounds

Min Pitch Range

The minimum pitch range that can be randomized

Max Pitch Range

The maximum pitch range that can be randomized

On Play

Custom trigger that's activated when audio plays

On Stop

Custom trigger that's activated when audio stops

On Change

Custom trigger that's activated when audio changes

Clips

The audio clips that can be played by the Audio Bank

RPC's are available via the SendRPC action

RPC

Valid Targets

Description

Play

Any

Plays the Clip at index of id

Stop

Any

Stops playing the currently playing clip (needs to be set to Continuous playback style)

PlayNext

Any

Plays the next audio clip using Playback Order

Shuffle

All

Shuffles the playlist

Quickstart Guide

  1. First, create an audio source in your Unity project and turn off the "Play on Awake" feature in the inspector.
  2. Create an empty object (position is not important) and add VRC_AudioBank component to it. Then simply drag and drop the "audio source" game object in the "Source" box. Now change "size" to a total number of tracks and add the audio files to the boxes below.
  1. Next you need to create a button (a game object) that will trigger the sound. Add the VRC_Trigger component to it. Be sure to check the "Advanced Mode" box and click "+" to add a trigger.
    Now change "Custom" to "OnInteract" and then add a SendRPC Action to it. After that click on this action, add a "receiver" and just drag and drop your AudioBank.
  1. Now, for a Play button you need to choose a "VRC_AudioBank.Play" method. Otherwise, use other methods but remember to create different buttons for different actions. Set "Targets" to "All" and uncheck "Use Player ID as last".
  1. There are other methods such as Stop, Skip and Shuffle. To have multiple buttons, simply copy/paste the play button and change the method.

Did this page help you?