AudioController.Play Method (String)

Audio Toolkit

Collapse image Expand Image Copy image CopyHover image
Plays an audio item with the name audioID.

Namespace: (Default Namespace)
Assembly: AudioToolkit (in AudioToolkit.dll) Version: 8.0.0.0 (8.0.0.0)

Syntax

C#
public static AudioObject Play(
	string audioID
)

Parameters

audioID
Type: System..::..String
The audio ID.

Return Value

Type: AudioObject
Returns the reference of the AudioObject that is used to play the audio item, or null if the audioID does not exist. Warning: Use PoolableReference<(Of <(<'T>)>)> to store an AudioObject reference if you have pooling enabled.

Remarks

If "3D sound" is enabled in the audio import settings of the audio clip the object will be placed right in front of the current audio listener which is usually on the main camera. Note that the audio object will not be parented - so you will hear when the audio listener moves.

See Also