Skip to content

format

typescript
Random.NextIntRanged(min, max)

class: Random

description

Returns a random integer within the range of min and max (random number does not include min and max).

parameter

param_nametypedescription
minnumberThe minimum value.
maxnumberThe maximum value.

return

typedescription
numberA random integer.

code example

typescript
let num = Random.NextIntRange();
Debug.Log(num);