官术网_书友最值得收藏!

Layers and parameters

Layers, as the name implies, allow us to stack different state machine levels on top of each other. This panel allows us to organize the layers easily and have a visual representation. We will not be doing much in this panel for now as it primarily relates to animation, but it's good to be familiar with it. Refer to the following screenshot of the window to find your way around the layers:

Here is a summary of the items shown in the previous screenshot:

  • Add layer: The + button creates a new layer at the bottom of the list.
  • Layer list: These are the layers currently inside the animator controller. You can click to select a layer and drag and drop layers to rearrange them.
  • Layer settings: The gear icon brings up a menu to edit animation-specific settings for the layer.

Second, we have the Parameters panel, which is far more relevant to our use of the animator controller. Parameters are variables that determine when to transition between states, and we can access them via scripts to drive our states. There are four types of parameters—float, int, bool, and trigger. You should already be familiar with the first three as they are primitive types in C#, but trigger is specific to the animator controller, not to be confused with physics triggers, which do not apply here. Triggers are just a means to trigger a transition between states explicitly.

The following screenshot shows the elements in the Parameters panel:

Here is a summary of the items depicted in the previous screenshot:

  • Search: We can quickly search through our parameters here. Simply type in the name and the list will populate with the search results.
  • Add parameter: This button lets you add new parameters. When you click on it, you must select the parameter type.
  • Parameter list: This is the list of parameters you've created. You can assign and view their values here. You can also reorder the parameters to your liking by dragging and dropping them in the correct order. This is merely for organization and does not affect functionality at all.

Lastly, there is an eyeball icon, which you can click to hide the Layers and Parameters panels altogether. When the panels are closed, you can still create new layers by clicking on the Layers dropdown and selecting Create New Layer:

主站蜘蛛池模板: 革吉县| 绥滨县| 津市市| 谷城县| 揭阳市| 苏尼特左旗| 海原县| 五寨县| 宽甸| 饶阳县| 铁岭市| 遂溪县| 隆化县| 凌海市| 白山市| 宁国市| 武清区| 泾源县| 罗山县| 东方市| 吉隆县| 蕲春县| 三门峡市| 临安市| 安义县| 金山区| 秀山| 七台河市| 大埔区| 宜宾县| 平塘县| 海淀区| 秦安县| 东源县| 孟连| 阳谷县| 永济市| 巴塘县| 涿州市| 新蔡县| 应城市|