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

Displaying public variables in the Inspector panel

I'm sure you're wondering what the word public means at the beginning of a variable statement:

public int number1 = 2;

It means that the variable will be visible and accessible. It will be visible as a property in the Inspector panel so that you can manipulate the value stored in the variable. It also means it can be accessed from other scripts using the Dot Syntax. You'll learn more about the Dot Syntax in Chapter 6, Using Dot Syntax for Object Communication.

主站蜘蛛池模板: 郎溪县| 莱芜市| 元谋县| 巴里| 内江市| 丰顺县| 禹城市| 依安县| 九龙城区| 丹巴县| 武宣县| 江华| 聂拉木县| 尖扎县| 秭归县| 广宗县| 信阳市| 平安县| 杨浦区| 什邡市| 三江| 吉林省| 织金县| 庆阳市| 凉城县| 建平县| 赤城县| 寿光市| 黄石市| 桃源县| 三穗县| 武威市| 庆阳市| 清水县| 大竹县| 江川县| 韶山市| 仁化县| 甘洛县| 宝兴县| 大安市|