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.