Search code examples
randomunity-game-enginemonoprng

What PRNG is Unity3D using?


I am designing an application with some security implications in Unity3D and deploying to iOS and Android.

This got me wondering what PRNG unity is using when calling functions in the Random module. Since the module has to be seeded, it is clearly a PRNG, but the documentation never specifies which one is used, let alone what the other variables are set to (e.g. a/c/m in case of the LCG).

Does anyone know which PRNG Unity3d uses and how it is configured?


Solution

  • At least on Android on iOS, Mono (and thus Unity3D) uses /dev/random as the source of random numbers.