SoundSource

The class of the SoundSource component

NameSpace
Accessibility

Ami.BroAudio

public

Public Variables

Variable
Type
Description

CurrentPlayer

The currently playing player

IsPlaying

bool

Whether the CurrentPlayer is playing

Public Methods

Method
Return
Parameters
Description

Play

void

Plays the audio base on the current PositionMode

void

SoundID id, Vector3 position

Plays audio in 3D space at the given position (SpatialBlend will be set to 3D automatically)

void

SoundID id, Transform followTarget

Plays audio in 3D space and keeps it following the target continuously (SpatialBlend will be set to 3D automatically)

PlayGlobally

void

Plays audio globally (2D)

Stop

void

Stop playing audio

void

float fadeOut

Stop playing audio by the given fadeOut time

SetVolume

void

float volume

Immediately sets the volume of the currently playing player

void

float volume, float fadeTime

Adjusts the volume of the currently playing player over the specified fade duration

SetPitch

void

float pitch

Immediately sets the pitch of the currently playing player

void

float pitch, BroAudioType audioType

Adjusts the pitch of the currently playing player over the specified fade duration

Last updated