1,新建slider并添加事件
1 public MediaPlayer _mediaPlayer; 2 public Slider _videoSeekSlider; 3 public Text time; 4 float _setVideoSeekSliderValue; 5 private bool _wasPlayingOnScrub; 6 7 void Update() 8 { 9 10 int _all = (int)float.Parse((_mediaPlayer.m_Info.GetDurationMs() * 0.001f).ToString("F1")); 11