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

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.

主站蜘蛛池模板: 荣昌县| 尼木县| 两当县| 滕州市| 纳雍县| 清远市| 神农架林区| 普安县| 临泉县| 阳西县| 浮梁县| 阿克| 新田县| 宜都市| 新沂市| 鄂尔多斯市| 连城县| 观塘区| 简阳市| 仙游县| 河源市| 乌兰察布市| 自贡市| 黑水县| 紫云| 佛冈县| 靖远县| 武汉市| 育儿| 安陆市| 汶川县| 惠水县| 轮台县| 克什克腾旗| 福鼎市| 玉环县| 襄垣县| 上杭县| 江阴市| 长汀县| 南涧|