We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 582c994 + 42fe475 commit e1238e8Copy full SHA for e1238e8
Assets/USharpVideo/Scripts/USharpVideoPlayer.cs
@@ -985,10 +985,10 @@ public void PlayNextVideoFromPlaylist()
985
{
986
Random.InitState(_shuffleSeed);
987
988
- int n = playlist.Length - 1;
989
- for (int i = 0; i < n; ++i)
+ for (int i = 0; i < playlist.Length - 1; ++i)
990
991
- int r = Random.Range(i + 1, n);
+ int r = Random.Range(i, playlist.Length);
+ if (i == r) { continue; }
992
VRCUrl flipVal = playlist[r];
993
playlist[r] = playlist[i];
994
playlist[i] = flipVal;
0 commit comments