Class Audio
- Namespace
- UILib
- Assembly
- UILib.dll
A class for interacting with UILib's audio.
Note: If you intend to play multiple arbitrary sounds at once, you should not use this class.
It's intended for most simple use cases, and has
an AudioSource per Play* method, but it can't
handle playing multiple sounds at once through the same
Play* method.
public static class Audio
- Inheritance
-
Audio
- Inherited Members
Methods
Play(AudioClip, float)
Plays the specified audio clip.
This is only usable from onInit onwards.
public static void Play(AudioClip clip, float volume)
Parameters
clipAudioClipThe clip to play
volumefloatThe volume to play the clip with
PlayError(Theme)
Plays the error notification sound from the provided theme.
Passing null for the theme means the current theme will be used instead.
This is only usable from onInit onwards.
public static void PlayError(Theme theme = null)
Parameters
themeTheme
PlayNavigation(Theme)
Plays the navigation sound from the provided theme.
Passing null for the theme means the current theme will be used instead.
This is only usable from onInit onwards.
public static void PlayNavigation(Theme theme = null)
Parameters
themeTheme
PlayNormal(Theme)
Plays the notification sound from the provided theme.
Passing null for the theme means the current theme will be used instead.
This is only usable from onInit onwards.
public static void PlayNormal(Theme theme = null)
Parameters
themeTheme