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

Assigning values while declaring a variable

Add some more variables to LearningScript using the types shown in the previous chart. While declaring the variables, assign them values as shown in the following screenshot. See how they are presented in the Inspector panel. These are all public variables, so they'll appear in the Inspector panel.

This screenshot shows what Unity presents in the Inspector panel:

The variables are displayed in the Inspector panel with the values set by default in the code. Remember that from now on, the value in the Inspector panel will override the value in the code, so if you decide to change your code a little, the value in Inspector will stay as it was initially.

主站蜘蛛池模板: 青岛市| 汪清县| 阳泉市| 巫山县| 克东县| 榆树市| 普兰店市| 修水县| 双城市| 巴林右旗| 宁波市| 安国市| 沅陵县| 榆树市| 清水县| 郸城县| 兴海县| 乾安县| 全椒县| 外汇| 前郭尔| 招远市| 久治县| 沙湾县| 孝义市| 莱阳市| 沅陵县| 鱼台县| 绥德县| 万州区| 河池市| 伽师县| 通辽市| 南开区| 湖州市| 河北省| 泗洪县| 岑溪市| 巴林右旗| 余江县| 哈尔滨市|