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

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.

主站蜘蛛池模板: 如东县| 德江县| 桃园市| 特克斯县| 雅安市| 嘉禾县| 南召县| 土默特左旗| 丹棱县| 武汉市| 大安市| 商水县| 阿拉善盟| 安宁市| 四子王旗| 随州市| 靖江市| 府谷县| 江西省| 垣曲县| 南安市| 兴义市| 台东市| 房产| 仪征市| 吉林市| 姚安县| 弥渡县| 桃园县| 谢通门县| 苏尼特右旗| 准格尔旗| 永济市| 库伦旗| 满城县| 舟曲县| 平昌县| 昌邑市| 安宁市| 长葛市| 金平|