Added AnimationCurveSampler, which returns random values according to a range and probability distribution denoted by a user provided AnimationCurve.
Added ParameterUIElementsEditor class to allow custom ScriptableObjects and MonoBehaviours to render Parameter and Sampler typed public fields correctly in their inspector windows.
## Using Parameters outside of Randomizers (ie: in MonoBehaviours and ScriptableObjects)
After adding a public Parameter field to a MonoBehaviour or ScriptableObject, you may have noticed that the Parameter's UI doesn't look the same as it does when added to a Randomizer. This is because the Inspector UI for most Perception randomization components is authored using Unity's relatively new UI Elements framework, though by default, Unity uses the old IMGUI framework to render default inspector editors.
Say you have the following CustomMonoBehaviour that has a public GameObjectParameter field:
```
using UnityEngine;
using UnityEngine.Experimental.Perception.Randomization.Parameters;
public class CustomMonoBehaviour : MonoBehaviour
{
public GameObjectParameter prefabs;
}
```
To force Unity to use UI Elements to render your CustomMonoBehaviour's inspector window, create a custom editor for your MonoBehaviour by deriving the ParameterUIElementsEditor class like so:
```
using UnityEditor;
using UnityEngine.Experimental.Perception.Editor;
[CustomEditor(typeof(CustomMonoBehaviour))]
public class TestClusterEditor : DefaultUIElementsEditor { }
```
### Categorical Parameters
Categorical parameters choose a value from a list of options that have no intrinsic ordering. For example, a material paramater randomly chooses from a list of material options, but the list of material options itself can be rearranged into any particular order without affecting the distribution of materials selected.
### Numeric Parameters
Numeric parameters use samplers to generate randomized structs. Take a look at the [ColorHsvaParameter]() class included in the perception package for an example on how to implement a numeric parameter.
Numeric parameters use samplers to generate randomized structs. Take a look at the [ColorHsvaParameter]() class included in the perception package for an example on how to implement a numeric parameter.