* **Action**: Add `LightRandomizer` to the list of Randomizers in `SimulationScenario`.
You will notice the the Randomizer's UI snippet contains one Parameter named `Light Intensity Parameter`. This is the same Parameter we added in the code block above. Here, you can set the sampling distribution (`Value`), `Seed`, and `Range` for this float Parameter.
You will notice the the Randomizer's UI snippet contains one Parameter named `Light Intensity Parameter`. This is the same Parameter we added in the code block above. Here, you can set the sampling distribution (`Value`), `Seed`, and `Range` for this float Parameter:
<palign="center">
<imgsrc="Images/light_rand_1.png"width="420"/>
</p>
* **Action**: In the UI snippet for `LightRandomzier`, set range minimum and maximum to 0.5 and 3.
Note that the `if (light)` is not a requirement if you make sure to only add the `LightRandomizerTag` component to objects that have a `Light` component; however, it is good practice to guard against possible mistakes by always make sure a component exists and is not null before using it.
* **Action**: Open `LightRandomizerTag.cs` and replace its contents with the code below:
```
using UnityEngine.Experimental.Perception.Randomization.Randomizers;
public class LightRandomizerTag : RandomizerTag
{
}
```
Yes, the Randomizer tags can be this simple if you just need to attach objects to Randomizers. Later, you will learn how to add code here to encapsulate more data and logic within the randomized objects.
* **Action**: Select `Directional Light` in the Scene's _**Hierarchy**_, and in the _**Inspector**_ tab, add a `Light Randomizer Tag` component.
Let's now add more variation to our light by randomizing its color as well.
* **Action**: Define a new `ColorRgbParameter`:
`public ColorRgbParameter lightColorParameter`
* **Action**: Inside the code block that intensity was previously applied, add code for sampling color from the above Parameter and applying it:
If you now check the UI snippet for `LightRandomizer`, you will notice that `Color Parameter` is now added. This Parameter includes four separate values for `Red`, `Green`, `Blue` and `Alpha`. The range for these is 0 to 1, which is already set and does not need to be modified. However, in order to get varied colors and not just different shades of grey, we need to set different seeds for each value.