unity c# random integer in range code example
Example 1: random.range unity
// returns 0 - 9
Random.Range(0, 10)
Example 2: unity random range int not working
float rand = UnityEngine.Random.Range(0, 4); Debug.Log(rand);
// returns 0 - 9
Random.Range(0, 10)
float rand = UnityEngine.Random.Range(0, 4); Debug.Log(rand);