System.Random vs UnityEngine.Random

Hi,

I was running a bit ahead of the challenges and made a random value while working on the array challenge. I did by making a new random with System.Random instead of UnityEngine’s Random.Range.

I did originally declare the random variable up above where the member variables are declared (in case there’s need for another random further down the line) but I moved it to inside the switch structure so I could screenshot it more easily.

I’m guessing that for this game the functionality is about the same but I do wonder if there are instances where one way is preferred over the other.

Cheers!

Privacy & Terms