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

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.

主站蜘蛛池模板: 牟定县| 保定市| 黎平县| 天津市| 华蓥市| 余姚市| 尼玛县| 合川市| 桦南县| 沙洋县| 卢龙县| 五华县| 交口县| 乳源| 水城县| 江华| 襄汾县| 潜山县| 东兰县| 伽师县| 长沙市| 道孚县| 湟源县| 安塞县| 青岛市| 虹口区| 韩城市| 那曲县| 盐亭县| 小金县| 东辽县| 灯塔市| 舟曲县| 碌曲县| 南通市| 兴隆县| 达孜县| 博爱县| 正定县| 保靖县| 扎鲁特旗|