AudioObject Class

Audio Toolkit

Collapse image Expand Image Copy image CopyHover image
The object playing the audio clip associated with a AudioSubItem

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

Syntax

C#
public class AudioObject : RegisteredComponent

Remarks

If audio object pooling is enabled make sure you store references to an AudioObject by using PoolableReference<(Of <(<'T>)>)>

Examples

 Copy imageCopy
var soundFX = new PoolableReference<AudioObject>( AudioController.Play( "someSFX" ) );

// some other part of the code executed later when the sound may have stopped playing 
// and was moved back to the pool
AudioObject audioObject = soundFX.Get();
if( audioObject != null )
{
    // it is safe to access audioObject here
    audioObject.Stop();
}

Inheritance Hierarchy

System..::..Object
  Object
    Component
      Behaviour
        MonoBehaviour
          (Default Namespace)..::..RegisteredComponent
            (Default Namespace)..::..AudioObject

See Also