/// <summary> /// Plays the specified music track. /// If another track is currently playing it will be stopped. /// </summary> /// <param name="path">Audio file path in Resources folder</param> /// <param name="options">Audio options</param> public static void Play(string path, AudioOptions options = null) { if (_audioPlayer.IsPlaying(path)) { return; } _audioPlayer.StopAll(); _audioPlayer.Play(path, options); }
/// <summary> /// Stops all audio files. /// </summary> public static void StopAll() { _audioPlayer.StopAll(); }