public static readonly Evt<AudioPlayer> ClipPlayed
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.
Is raised when the a clip is played by the audio manager.
private void OnEnable()
{
AudioManager.ClipPlayed.Add(OnClipPlayed);
AudioManager.Play("MyClip");
}
private void OnClipPlayed(AudioPlayer player)
{
Debug.Log($"{player.PlayerSource}");
}