Is Unity's Random seeded automatically?

Posted by Lohoris on Game Development See other posts from Game Development or by Lohoris
Published on 2014-06-05T07:43:59Z Indexed on 2014/06/05 9:44 UTC
Read the original article Hit count: 247

Filed under:
|

I seem to recall Unity's Random is automatically seeded; checking the documentation it doesn't say it outright, but a certain interpretation of their words might seem to imply it.

The seed is normally set from some arbitrary value like the system clock before the random number functions are used. This prevents the same run of values from occurring each time a game is played and thus avoids predictable gameplay. However, it is sometimes useful to produce the same run of pseudo-random values on demand by setting the seed yourself.

(emphasis added)

© Game Development or respective owner

Related posts about unity

Related posts about random