public void OnPlayerSnapshotTaken(string path) { if (_snapshotTakenEvent != null) { _snapshotTakenEvent.Invoke(path); } }
public void OnPathPrepared(string path, bool playImmediately) { #if UNITY_EDITOR if (EditorApplication.isPaused) { return; } #endif _mediaPlayer.Mute = _mute; _mediaPlayer.Volume = _volume; _mediaPlayer.PlaybackRate = _playRate; if (!_path.Equals(_tmpPath)) { if (IsPlaying) { Stop(); } _tmpPath = _path; _mediaPlayer.DataSource = new Uri(path); } if (!playImmediately) { _mediaPlayer.Prepare(); } else { _mediaPlayer.Play(); } if (_mediaPlayerLoop != null && !_mediaPlayerLoop.IsReady) { _mediaPlayerLoop.DataSource = _mediaPlayer.DataSource; _mediaPlayerLoop.Prepare(); } if (_pathPreparedEvent != null) { _pathPreparedEvent.Invoke(path); } }