Class SoundPlayer
A basic Singleton audio player to play sounds.
Inheritance
Object
Component
Behaviour
MonoBehaviour
SoundPlayer
Inherited Members
Namespace: GGL.Audio.Player
Assembly: GGL.dll
Syntax
[AddComponentMenu("GG-Library/Singletons/Audio/Sound Player")]
[HelpURL("https://ggl.yoannhaffner.com/articles/audio.html#optimisation")]
public class SoundPlayer : AbstractPlayer<SoundPlayer>
Methods
| Edit this page View SourcePlayClip(AudioClip, float)
Play an audio file on the Singleton audio player.
Declaration
protected override void PlayClip(AudioClip clip, float volume = 1)
Parameters
Type | Name | Description |
---|---|---|
AudioClip | clip | Audio file to play. |
float | volume | Volume in range [0;1]. |
Overrides
| Edit this page View SourceStopClip()
Stop whatever is being played.
Declaration
protected override void StopClip()