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

Using multiword variable names

Let's use the same example again, as follows:

public bool areRoadConditionsPerfect = true;

You can see that the variable name is actually four words squeezed together. Since variable names can be only one word, begin the first word with a lowercase and then just capitalize the first letter of every additional word. This greatly helps create descriptive names which the viewer is still able to read. There's a term for this, called camel casing.

I have already mentioned that for public variables, Unity's Inspector will separate each word and capitalize the first word. Go ahead! Add the previous statement to LearningScript and see what Unity does with it in the Inspector panel.

主站蜘蛛池模板: 广丰县| 磐石市| 福建省| 崇信县| 汤原县| 永和县| 辽中县| 崇明县| 贡觉县| 三门峡市| 三都| 新泰市| 磐石市| 广河县| 望都县| 云林县| 靖远县| 高州市| SHOW| 缙云县| 定远县| 塔城市| 凉城县| 霍山县| 阜康市| 娄底市| 庆城县| 日喀则市| 密山市| 邵武市| 陵川县| 通江县| 女性| 邓州市| 池州市| 通渭县| 南昌市| 金川县| 湾仔区| 江西省| 石阡县|