- Main Page
- Getting Started
- Editor Manual
- Scripting
- Overview
- Your Scripts
- Game State and Logic
- Customising PowerQuest
- Animation Events
- Function Reference
- User Script Reference
- Version History
- Download PowerQuest
- About/Community
![]() |
PowerQuest 0.19.4
|
Audio handle- Use for changing a sound that's currently playing.
Properties | |
AudioSource | source [get] |
Retrieves the unity AudioSource this handle is using. | |
string | cueName [get] |
bool | isPlaying [get] |
Is the clip playing right now? (Read Only). Note: will return false when AudioSource.Pause is called. | |
float | volume [get, set] |
The base volume of clip (0.0 to 1.0) Before falloff, ducking, etc is applied. To get the final volume, use source.volume. | |
float | pitch [get, set] |
The pitch of the audio source. See Unity docs for more info. | |
float | panStereo [get, set] |
Pans a playing sound in a stereo way (left or right). See Unity docs for more info. | |
float | time [get, set] |
Playback position in seconds. See Unity docs for more info. | |
bool | loop [get] |
Is the audio clip looping. | |
float | startDelay [set] |
Delay before cue is started- must be set immediately after playing (same as AfterDelay() ) | |
AudioClip | clip [get] |
The audio clip that is playing. | |
Static Public Member Functions | |
static bool | IsPlaying (AudioHandle handle) |
static bool | IsNullOrStopped (AudioHandle handle) |
static implicit | operator AudioSource (AudioHandle handle) |
Public Member Functions | |
AudioHandle (AudioSource source, string fromCue=null) | |
void | Pause () |
Pauses playing the clip. | |
void | UnPause () |
Resumes playing the clip after pausing. | |
void | Stop (float overTime=0.0f, float afterDelay=0.0f) |
Stops the clip, optionally fading out over time, and/or after a delay. | |
void | AfterDelay (float time) |
Makes the clip start after the passed in time (if called immediately after play) eg. `Audio.Play("GunshotEcho").AfterDelay(1.0f);. | |
AudioHandle | FadeIn (float overTime) |
Fades in the sound from zero, call directly after playing the sound to fade it in. eg Audio.Play("MoodyAmbience").FadeIn(1); | |
AudioHandle | Fade (float targetVolume, float overTime) |
Fades the volume from it's current volume to another over the specified length of time. | |
|
get |
Retrieves the unity AudioSource this handle is using.
|
get |
Is the clip playing right now? (Read Only). Note: will return false when AudioSource.Pause is called.
|
getset |
The base volume of clip (0.0 to 1.0) Before falloff, ducking, etc is applied. To get the final volume, use source.volume.
|
getset |
The pitch of the audio source. See Unity docs for more info.
|
getset |
Pans a playing sound in a stereo way (left or right). See Unity docs for more info.
|
getset |
Playback position in seconds. See Unity docs for more info.
|
get |
Is the audio clip looping.
|
set |
Delay before cue is started- must be set immediately after playing (same as AfterDelay()
)
|
get |
The audio clip that is playing.
|
inline |
Pauses playing the clip.
|
inline |
Resumes playing the clip after pausing.
|
inline |
Stops the clip, optionally fading out over time, and/or after a delay.
|
inline |
Makes the clip start after the passed in time (if called immediately after play) eg. `Audio.Play("GunshotEcho").AfterDelay(1.0f);.
|
inline |
Fades in the sound from zero, call directly after playing the sound to fade it in. eg Audio.Play("MoodyAmbience").FadeIn(1);
|
inline |
Fades the volume from it's current volume to another over the specified length of time.