Declaration


public static readonly Evt<AudioPlayer> ClipPlayed

Returns


Evt

A class that works like an action, but with a better API setup. Use Add() or Remove() like += & -= from an action. Passes the audio player the clip is playing on as a parameter in the event.

Description


Is raised when the a clip is played by the audio manager.

Example


private void OnEnable()
{
		AudioManager.ClipPlayed.Add(OnClipPlayed);
		AudioManager.Play("MyClip");
}

private void OnClipPlayed(AudioPlayer player)
{
		Debug.Log($"{player.PlayerSource}");
}