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

Variables become component properties

When we refer to components, we are basically referring to the available functions of a GameObject, for example, the human body has many functions, such as talking, moving, and observing. Now let's say that we want the human body to move faster. What is the function linked to that action? Movement. So in order to make our body move faster, we would need to create a script that had access to the movement component and then we would use that to make the body move faster. Just like in real life, different GameObjects can also have different components, for example, the camera component can only be accessed from a camera. There are plenty of components that already exist that were created by Unity's programmers, but we can also write our own components. This means that all the properties that we see in Inspector are just variables of some type. They simply store data that will be used by some method.

主站蜘蛛池模板: 土默特右旗| 曲麻莱县| 开鲁县| 剑川县| 特克斯县| 电白县| 四子王旗| 龙门县| 怀柔区| 漳平市| 宜宾市| 神木县| 丰镇市| 天长市| 马龙县| 东平县| 泸西县| 永善县| 东丰县| 铁岭县| 鸡东县| 连云港市| 义乌市| 辽阳市| 五寨县| 油尖旺区| 张家川| 民乐县| 泸水县| 托里县| 比如县| 英德市| 泾阳县| 长子县| 温宿县| 水城县| 绵竹市| 瑞安市| 乌兰县| 曲阜市| 沁水县|