how to get random number in unity code example
Example 1: random number generator unity
int num = Random.Range(min, max);
Example 2: unity random int
public int RanTimerHigh = 10;
public int RanTimerLow = 1;
void Start()
{
int RandomInt = Random.Range(RanTimerLow, RanTimerHigh);
}
Example 3: random in unity
int num = Random.Range(min, max);
float num2 = Random.Range(min, max);
Example 4: unity how to generate a random number
Vector3 position = new Vector3(Random.Range(-10.0f, 10.0f), 0, Random.Range(-10.0f, 10.0f));