Class BackgroundAudio.Player
The
Namespace: OmiyaGames.Audio
Assembly: cs.temp.dll.dll
Syntax
public abstract class Player : MonoBehaviour
Properties
Data
The BackgroundAudio that generated
this instance. Also holds the
Declaration
public abstract BackgroundAudio Data { get; }
Property Value
Type | Description |
---|---|
BackgroundAudio |
IsPausedOnTimeStop
Gets or sets whether this player
should pause when
Declaration
public abstract bool IsPausedOnTimeStop { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
MixerGroup
Sets the mixer group this player streams its audio through.
Declaration
public abstract AudioMixerGroup MixerGroup { set; }
Property Value
Type | Description |
---|---|
AudioMixerGroup |
Remarks
Primarily used by MixerGroupManager to handle fade-ins and fade-outs.
State
Gets the state of this player.
Declaration
public abstract BackgroundAudio.PlayState State { get; }
Property Value
Type | Description |
---|---|
BackgroundAudio.PlayState |
Methods
OnDestroy()
Declaration
protected virtual void OnDestroy()
Play(PlaybackArgs)
Plays the audio from Data.
Declaration
public abstract void Play(PlaybackArgs args)
Parameters
Type | Name | Description |
---|---|---|
PlaybackArgs | args | Adds additional configuration details, such as delaying when the player starts playing. This argument can be null, in which case the player starts immediately. |
Remarks
Stop()
Stops playing the audio.
Declaration
public abstract void Stop()
Remarks
Events
OnAfterChangeState
Event that triggers after State changes.
Declaration
public abstract event ITrackable<BackgroundAudio.PlayState>.ChangeEvent OnAfterChangeState
Event Type
Type | Description |
---|---|
ITrackable.ChangeEvent<> |
OnBeforeChangeState
Event that triggers before State changes.
Declaration
public abstract event ITrackable<BackgroundAudio.PlayState>.ChangeEvent OnBeforeChangeState
Event Type
Type | Description |
---|---|
ITrackable.ChangeEvent<> |
OnBeforeDestroy
Event that triggers when this script is destroyed.
Declaration
public event Action<BackgroundAudio.Player> OnBeforeDestroy
Event Type
Type | Description |
---|---|
Action<BackgroundAudio.Player> |