







![]() |
ClockStone Audio Toolkit for Unity - Documentation |
AudioObject Class |
Members Example See Also Send Feedback |
![]() |
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
![]() | |
---|---|
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
Object
Component
Behaviour
MonoBehaviour
(Default Namespace)..::..RegisteredComponent
(Default Namespace)..::..AudioObject