unity rand int code example
Example 1: random number generator unity
int num = Random.Range(min, max);
Example 2: unity random float
// To get a random float between two values:
float number = Random.Range(0.0f, 3.0f);
int num = Random.Range(min, max);
// To get a random float between two values:
float number = Random.Range(0.0f, 3.0f);