AudioSource 音频源

Inherits from Behaviour

A representation of audio sources in 3D.


An AudioSource is attached to a GameObject for playing back sounds in a 3D environment. Mono sounds play back 3D. In order to play 3D sounds you also need to have a AudioListener. The audio listener is normally attached to the camera you want to use. Stereo sounds are always played back without distance based attenuation.


You can play a single audio clip using Play, Pause and Stop. You can also adjust its volume while playing using volume property, or seek using time. Multiple sounds can be played on one AudioSource using PlayOneShot. You can play a clip at a static position in 3D space using PlayClipAtPoint.


参见:AudioListener, AudioClip



Class Functions类函数

Inherited members继承成员

Inherited Variables继承变量

Inherited Functions继承函数

Inherited Class Functions继承类函数

Page last updated: 2011-4-6