# value

> Returns a random float within [0.0..1.0] (range is inclusive) (Read Only).

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static float value { get; }
```

### Remarks

**Important**: Both the lower and upper bounds are **inclusive**. Any given float value between 0.0 and 1.0, *including both 0.0 and 1.0*, will appear on average approximately once every ten million random samples.

See [Random](/engine/6000.6/script-reference/unityengine/random.md) for more examples of how `UnityEngine.Random` may be different from other random number generators.

### Examples

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    void Start()
    {
        Color randomColor = RandomColor();
    }

    // Generate a random color value.
    Color RandomColor()
    {
        // A different random value is used for each color component (if
        // the same is used for R, G and B, a shade of grey is produced).
        return new Color(Random.value, Random.value, Random.value);
    }
}
```
