public void Play(string name, Action <PYAudioSource.PYAudioSourceEventData> callback) { PYPlayer player = StartAudio(name); PYAudioSource source = player.PYSource; if (source == null) { return; } source.Volume(player.Volume) .Pitch(player.Pitch) .Delay(player.Delay) .Loop(player.Loop).Play(callback); }
public void Play(string name) { PYPlayer player = StartAudio(name); PYAudioSource source = player.PYSource; if (source == null) { return; } source.Volume(player.Volume) .Pitch(player.Pitch) .Delay(player.Delay) .Loop(player.Loop).Play(); }