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
The order that Clips should be played in
The playback style that should be used.
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
Custom trigger that's activated when audio plays
Custom trigger that's activated when audio stops
Custom trigger that's activated when audio changes
The audio clips that can be played by the Audio Bank
RPC's are available via the SendRPC action
Plays the Clip at index of id
Stops playing the currently playing clip (needs to be set to Continuous playback style)
Plays the next audio clip using Playback Order
Shuffles the playlist
- First, create an audio source in your Unity project and turn off the "Play on Awake" feature in the inspector.
- 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.
- 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.
- 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".
- There are other methods such as Stop, Skip and Shuffle. To have multiple buttons, simply copy/paste the play button and change the method.
Updated 7 months ago