AudioSource

More information can be found in the Unity API Reference

Constructors

Constructor

Description

AudioSource()

Members

Member

Description

bypassEffects

bypassListenerEffects

bypassReverbZones

clip

dopplerLevel

enabled

gameObject

ignoreListenerPause

ignoreListenerVolume

isActiveAndEnabled

isPlaying

isVirtual

loop

maxDistance

minDistance

mute

name

panStereo

pitch

playOnAwake

priority

reverbZoneMix

spatialBlend

spatialize

spatializePostEffects

spread

tag

time

timeSamples

transform

volume

Methods

Method

Description

CompareTag(tag)

GetAmbisonicDecoderFloat(index, value)

GetHashCode()

GetOutputData(samples, channel)

GetOutputData(channel)

Gets a float[64] array of the next audio samples.

GetSpatializerFloat(index, value)

GetSpectrumData(channel)

Gets a float[64] array of current spectrum data using FFT.

Pause()

Play()

Play(delay)

PlayDelayed(delay)

PlayOneShot(clip)

PlayOneShot(clip, volumeScale)

PlayScheduled(time)

SetAmbisonicDecoderFloat(index, value)

SetOutputAudioMixer(mixer)

Sets the output audio mix of this audio source.

SetScheduledEndTime(time)

SetScheduledStartTime(time)

SetSpatializerFloat(index, value)

Stop()

ToString()

UnPause()

Static methods

Method

Description

PlayClipAtPoint(clip, position)

PlayClipAtPoint(clip, position, volume)

Details

class AudioSource
AudioSource AudioSource()
bool bypassEffects
bool bypassListenerEffects
bool bypassReverbZones
AudioClip clip
float dopplerLevel
bool enabled
const GameObject gameObject
bool ignoreListenerPause
bool ignoreListenerVolume
const bool isActiveAndEnabled
const bool isPlaying
const bool isVirtual
bool loop
float maxDistance
float minDistance
bool mute
string name
float panStereo
float pitch
bool playOnAwake
int priority
float reverbZoneMix
float spatialBlend
bool spatialize
bool spatializePostEffects
float spread
string tag
float time
int timeSamples
const Transform transform
float volume
bool CompareTag(string tag)
bool GetAmbisonicDecoderFloat(int index, float value)
int GetHashCode()
void GetOutputData(array<float> samples, int channel)
array<float> GetOutputData(int channel)

Gets a float[64] array of the next audio samples.

bool GetSpatializerFloat(int index, float value)
array<float> GetSpectrumData(int channel)

Gets a float[64] array of current spectrum data using FFT.

void Pause()
void Play()
void Play(UInt64 delay)
void PlayDelayed(float delay)
void PlayOneShot(AudioClip clip)
void PlayOneShot(AudioClip clip, float volumeScale)
void PlayScheduled(double time)
bool SetAmbisonicDecoderFloat(int index, float value)
void SetOutputAudioMixer(AudioMixer mixer)

Sets the output audio mix of this audio source.

void SetScheduledEndTime(double time)
void SetScheduledStartTime(double time)
bool SetSpatializerFloat(int index, float value)
void Stop()
string ToString()
void UnPause()
static void PlayClipAtPoint(AudioClip clip, Vector3 position)
static void PlayClipAtPoint(AudioClip clip, Vector3 position, float volume)