Random.Range gives the same value in WebGL Build
But in Editor works fine, any help pls
Comment
I have noticed the same issue. Any fix? Any other random generator to use instead?
List orderedList = new[] { 0, 1, 2, 3 }.ToList();
Answer[] newOrder = new Answer[4];
for (int i = 0; i < 4; i++)
{
var randomNr = Random.Range(0, orderedList.Count);
var takeNr = orderedList[randomNr];
orderedList.Remove(randomNr);
newOrder[i] = answers[takeNr];
}
answers = newOrder;
Your answer
Follow this Question
Related Questions
WebGL and Python Building Errors 0 Answers
WebGL build failure: Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.Profiler 1 Answer
WebGL Build doesn't fully load on Github Pages 0 Answers
Random.Range code problem or problem with Unity? 1 Answer
how to randomly instantiate prefabs but each with it's own probability? 2 Answers