# Custom Random Provider

ShakeFX components have an `IRandomProvider RandomProvider { get; set; }` property that can be used to replace the default implementation (ex for deterministic playback).

Create a class that implements the `float IRandomProvider.GetNormalizedFloat()` method (it should return a random number in the 0 to 1 range) and assign an instance of it to the property.

The default implementation simply uses [UnityEngine.Random.value](https://docs.unity3d.com/6000.3/Documentation/ScriptReference/Random-value.html).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fx-engine.gitbook.io/shakefx/custom/custom-random-provider.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
