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

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.

主站蜘蛛池模板: 博湖县| 河源市| 贞丰县| 淳化县| 白银市| 航空| 洱源县| 巴南区| 肇庆市| 酒泉市| 盐城市| 武安市| 光山县| 临武县| 阜新| 东港市| 四会市| 河源市| 彩票| 吉安市| 曲松县| 阿鲁科尔沁旗| 彭水| 育儿| 贵州省| 西林县| 罗城| 阿克| 沙雅县| 高雄市| 达日县| 太保市| 全州县| 泗阳县| 陈巴尔虎旗| 阜宁县| 会宁县| 金堂县| 漯河市| 平安县| 宁阳县|