random 1-2 number in unity code example
Example 1: unity random range
Random.Range(-10.0f, 10.0f);
Example 2: random selection 2 numbers unity
float angle = Random.Range(0.0F, 1.0F) < 0.5F ? 90.0F : -90.0F;
Random.Range(-10.0f, 10.0f);
float angle = Random.Range(0.0F, 1.0F) < 0.5F ? 90.0F : -90.0F;