当前位置:网站首页>2.10transfrom attribute
2.10transfrom attribute
2022-07-06 07:50:00 【The ji】
How to get more , You can put transfrom, Understand it as an attribute ( Every object can have attributes )
such as sl = transform.GetChild(0).GetComponent<Slider>(); He is slider In the properties of the . Location . Get components
game.transform.parent = Content.transform;
And he Content“ After acquiring her components , He still wants some transfrom attribute ”
Go and get game Class transfrom attribute , then .parent Properties of
1. Find components through code
2.playerImg.sprite=imgs[0].sprite; He means that one of his attributes is revealed through it ( stay image On )
3.sT.onClick.AddListener(jdbtn); //AddListener== Add method // Code acquisition button Click events for
1. The first 29 OK, he wants to name one using system Space , He gets time ( Or you could write it as System.DateTime.Now.Tostring(), No need to write namespace .)
2.30 OK, he added a name to the random number , Because random numbers are using system and unityEngince meanwhile
There is , So choose one
3.32-34 OK, he just clones an object ( Text ), Give to the Gameobject game, then To get the text , You need to ,game.getcomponent<text>().text . adopt Gameobject Class go , Get his components text.
parent Method represents a subclass of an object , So put the location attribute , Give it to him game Subclasses of classes .
as follows
边栏推荐
- 继电反馈PID控制器参数自整定
- PHP Coding Standard
- Machine learning - decision tree
- 数据治理:元数据管理篇
- 08- [istio] istio gateway, virtual service and the relationship between them
- After the hot update of uniapp, "mismatched versions may cause application exceptions" causes and Solutions
- 数字经济时代,如何保障安全?
- Mex related learning
- Qualitative risk analysis of Oracle project management system
- 49. Sound card driven article collection
猜你喜欢
随机推荐
Entity class design for calculating age based on birthday
TS 类型体操 之 循环中的键值判断,as 关键字使用
Do you really think binary search is easy
leecode-C语言实现-15. 三数之和------思路待改进版
MEX有关的学习
Ble of Jerry [chapter]
The difference between TS Gymnastics (cross operation) and interface inheritance
Redis list detailed explanation of character types yyds dry goods inventory
Hackathon ifm
opencv学习笔记八--答题卡识别
08- [istio] istio gateway, virtual service and the relationship between them
TS类型体操 之 字符串的妙用
Parameter self-tuning of relay feedback PID controller
edge浏览器 路径获得
24. Query table data (basic)
Helm install Minio
Comparison of usage scenarios and implementations of extensions, equal, and like in TS type Gymnastics
C intercept string
Three no resumes in the software testing industry. What does the enterprise use to recruit you? Shichendahai's resume
Generator Foundation