Click or drag to resize

AudioService Class

Global Audio Service
Inheritance Hierarchy

Namespace:  ImmerseSDK.Audio
Assembly:  ImmerseSDK.App (in ImmerseSDK.App.dll) Version: 3.5.0.0 (3.5.0.0)
Syntax
C#
public class AudioService : SingletonBehaviour

The AudioService type exposes the following members.

Constructors
  NameDescription
Public methodAudioService
Initializes a new instance of the AudioService class
Top
Properties
  NameDescription
Public propertyAudioListener
Gets the AudioListener created
Top
Methods
  NameDescription
Public methodCoroutineInitialise
This method is used by our internal systems so do not call it directly.
(Overrides SingletonBehaviourCoroutineInitialise.)
Protected methodOnDestroy (Overrides SingletonBehaviourOnDestroy.)
Public methodStatic memberPlay(String)
Play AudioClip from Resources (0.2f volume)
Public methodStatic memberPlay(AudioClip)
Play and AudioClip in 2D (0.2f volume)
Public methodStatic memberPlay(AudioServiceSounds)
Play one of the 'built in' AudioClips (0.2f volume)
Public methodStatic memberPlay(String, Single)
Play AudioClip from Resources
Public methodStatic memberPlay(AudioClip, Single)
Play and AudioClip in 2D
Public methodStatic memberPlay(AudioServiceSounds, Single)
Play one of the 'built in' AudioClips
Public methodSetAudioListener
Sets a new AudioListener. When null is passed in, we search the hierarchy of the App.CameraService.Camera for the AudioListener. Also disables all other AudioListenrs in the scene
Public methodToString
returns "Audio Service"
(Overrides UnityEngine.Object.ToString.)
Top
Extension Methods
  NameDescription
Public Extension MethodGetCopyOf
Copies all properties of a component from source to target. Uses reflection to set properties.
(Defined by ComponentExtensions.)
Public Extension MethodWaitForT
Waits for a singleton on a coroutine
(Defined by SingletonManager.)
Top
See Also