unity random float

C#
 // To get a random float between two values:
 float number = Random.Range(0.0f, 3.0f);
Source

Also in C#: