Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


NextUInt

Returns a uniformly random uint value in the interval [0, 4294967294].
Read time 1 minuteLast updated 6 days ago

Definition

NextUInt()

Returns a uniformly random uint value in the interval [0, 4294967294].
public uint NextUInt()

Returns

Type

Description

uintA uniformly random unsigned integer.

NextUInt(uint)

Returns a uniformly random uint value in the interval [0, max).
public uint NextUInt(uint max)

Parameters

max

The maximum value to generate, exclusive.

Returns

Type

Description

uintA uniformly random unsigned integer in the range [0, max).

NextUInt(uint, uint)

Returns a uniformly random uint value in the interval [min, max).
public uint NextUInt(uint min, uint max)

Parameters

min

The minimum value to generate, inclusive.

max

The maximum value to generate, exclusive.

Returns

Type

Description

uintA uniformly random unsigned integer in the range [min, max).