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

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.

主站蜘蛛池模板: 旬邑县| 乃东县| 盖州市| 营口市| 廊坊市| 晋城| 扎兰屯市| 芦溪县| 青阳县| 平陆县| 肇源县| 乌鲁木齐县| 景宁| 南乐县| 文安县| 于田县| 旬阳县| 宁安市| 临沭县| 定南县| 蓬安县| 丰台区| 黑水县| 唐海县| 太白县| 大足县| 日土县| 新龙县| 黄陵县| 申扎县| 德令哈市| 海伦市| 治多县| 固镇县| 申扎县| 黄冈市| 巧家县| 四平市| 河南省| 石景山区| 辉县市|