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

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.

主站蜘蛛池模板: 女性| 峨山| 合阳县| 达拉特旗| 奇台县| 天柱县| 永和县| 会宁县| 石台县| 大关县| 南开区| 新巴尔虎右旗| 滨海县| 遂溪县| 昆山市| 昌乐县| 井研县| 沙雅县| 上犹县| 汝城县| 新和县| 翼城县| 达拉特旗| 阜城县| 申扎县| 通海县| 汝南县| 云梦县| 嘉定区| 顺义区| 张家口市| 雅安市| 庐江县| 社旗县| 开鲁县| 张家港市| 门源| 江北区| 唐河县| 龙山县| 灵台县|