浏览代码

Update Phase2.md

/main
Mohsen Kamalzadeh 4 年前
当前提交
893507c1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      com.unity.perception/Documentation~/Tutorial/Phase2.md

2
com.unity.perception/Documentation~/Tutorial/Phase2.md


Notice there is a `RequireComponent(typeof(Light))` line at the top. This line makes it so that you can only add the `MyLightRandomizerTag` component to an object that already has a `Light` component attached. This way, the Randomizers that query for this tag can be confident that the found objects have a `Light` component and can thus be Randomized.
* **Action**: Select `Directional Light` in the Scene's _**Hierarchy**_, and in the _**Inspector**_ tab, add a `Light Randomizer Tag` component.
* **Action**: Select `Directional Light` in the Scene's _**Hierarchy**_, and in the _**Inspector**_ tab, add a `My Light Randomizer Tag` component.
* **Action**: Run the simulation again and inspect how `Directional Light` now switches between different intensities. You can pause the simulation and then use the step button (to the right of the pause button) to move the simulation one frame forward and clearly see the varying light intensity
Let's now add more variation to our light by randomizing its color as well.

正在加载...
取消
保存