Skip to main content
2 of 4
deleted 98 characters in body
Peter
  • 10k
  • 2
  • 33
  • 46

Thomas answered the question as asked. The more important question is as follows:

Is the Unity 2017 random number generator guaranteed to deliver the same numbers across all current and future platforms given the same seed, and is it also guaranteed to deliver the same numbers as future releases of Unity?

There is a rather high likelihood for this being the case, but that isn't the same as a guarantee. So the answer, unfortunately, is "no, it is not". A guarantee would need to be explicitly stated in the documentation of Random, but currently there is no such thing.

And some bit of personal advice: Even if there were such a guarantee, I'd recommend not to trust it - even with a guarantee there's still a chance of the implementation being changed by accident (a bug), or simply being deprecated and later removed. You also may want to reuse the generator outside of the Unity framework at some point. Instead of relying on Unity, just copy a random number generator someone else wrote (make sure you're allowed to use the code), and write a test to verify it satisfies your requirements for randomness.

Peter
  • 10k
  • 2
  • 33
  • 46