C# Класс UnityEngine.AudioSource

Наследование: Behaviour
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
GetCustomCurve AnimationCurve
GetOutputData float[]
GetOutputDataHelper void
GetSpatializerFloat bool
GetSpectrumData float[]
GetSpectrumDataHelper void
INTERNAL_CALL_Pause void
INTERNAL_CALL_UnPause void
Play void
Play void
PlayClipAtPoint void
PlayDelayed void
PlayOneShot void
PlayOneShot void
PlayScheduled void
SetCustomCurve void
SetScheduledEndTime void
SetScheduledStartTime void
SetSpatializerFloat bool
Stop void

Открытые методы

Метод Описание
GetOutputData ( float samples, int channel ) : void

Provides a block of the currently playing source's output data.

GetSpectrumData ( float samples, int channel, FFTWindow window ) : void

Provides a block of the currently playing audio source's spectrum data.

Pause ( ) : void

Pauses playing the clip.

PlayClipAtPoint ( AudioClip clip, Vector3 position, [ volume ) : void

Plays an AudioClip at a given position in world space.

UnPause ( ) : void

Unpause the paused playback of this AudioSource.

Приватные методы

Метод Описание
GetCustomCurve ( AudioSourceCurveType type ) : AnimationCurve
GetOutputData ( int numSamples, int channel ) : float[]
GetOutputDataHelper ( float samples, int channel ) : void
GetSpatializerFloat ( int index, float &value ) : bool
GetSpectrumData ( int numSamples, int channel, FFTWindow window ) : float[]
GetSpectrumDataHelper ( float samples, int channel, FFTWindow window ) : void
INTERNAL_CALL_Pause ( AudioSource self ) : void
INTERNAL_CALL_UnPause ( AudioSource self ) : void
Play ( ) : void
Play ( [ delay ) : void
PlayClipAtPoint ( AudioClip clip, Vector3 position ) : void
PlayDelayed ( float delay ) : void
PlayOneShot ( AudioClip clip ) : void
PlayOneShot ( AudioClip clip, [ volumeScale ) : void
PlayScheduled ( double time ) : void
SetCustomCurve ( AudioSourceCurveType type, AnimationCurve curve ) : void
SetScheduledEndTime ( double time ) : void
SetScheduledStartTime ( double time ) : void
SetSpatializerFloat ( int index, float value ) : bool
Stop ( ) : void

Описание методов

GetOutputData() публичный Метод

Provides a block of the currently playing source's output data.

public GetOutputData ( float samples, int channel ) : void
samples float The array to populate with audio samples. Its length must be a power of 2.
channel int The channel to sample from.
Результат void

GetSpectrumData() публичный Метод

Provides a block of the currently playing audio source's spectrum data.

public GetSpectrumData ( float samples, int channel, FFTWindow window ) : void
samples float The array to populate with audio samples. Its length must be a power of 2.
channel int The channel to sample from.
window FFTWindow The FFTWindow type to use when sampling.
Результат void

Pause() публичный Метод

Pauses playing the clip.

public Pause ( ) : void
Результат void

PlayClipAtPoint() публичный статический Метод

Plays an AudioClip at a given position in world space.

public static PlayClipAtPoint ( AudioClip clip, Vector3 position, [ volume ) : void
clip AudioClip Audio data to play.
position Vector3 Position in world space from which sound originates.
volume [ Playback volume.
Результат void

UnPause() публичный Метод

Unpause the paused playback of this AudioSource.

public UnPause ( ) : void
Результат void