- Home /
RandFuncs.Shuffle question
I have the need to shuffle an array to allow it to be random, so when I read the array in order, its results will be randomly place in it.
I have the questionArray = [0,1,2,3,4,5,6,7,8,9]
which I will then use to display questions from another table.
I wanted to use Shuffle to randomly arrange this array. I thought I would pass it the array, let it shuffle and then get it back
questionArray = RandFuncs.Shuffle(questionArray);
but I get BCE0022: Cannot convert 'void' into 'int[]'
Fee like an idiot, but I tried just using the RandFuncs.Shuffle(questionArray), (not questionArray = RandFuncs.Shuffle (questionArray)
and it works like a charm.... Not sure why I was trying to do that..
Your answer
Follow this Question
Related Questions
Randomly Choosing two objects from an array and switching their positions 3 Answers
How to instantiate the first 8 gameobjects in an array (UnityScript)? 1 Answer
Problems with array "shuffle bag" 1 Answer
Store multiple random integers in an array? 4 Answers
C# Array with random.range help? 2 Answers