当前位置:网站首页>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
边栏推荐
- C # create database connection object SQLite database
- http缓存,强制缓存,协商缓存
- 1015 reversible primes (20 points) prime d-ary
- How to prevent Association in cross-border e-commerce multi account operations?
- Typescript interface and the use of generics
- WebRTC系列-H.264预估码率计算
- When the Jericho development board is powered on, you can open the NRF app with your mobile phone [article]
- Emo diary 1
- 数据治理:误区梳理篇
- Méthode d'obtention des propriétés de l'objet JS (.Et [] méthodes)
猜你喜欢
继电反馈PID控制器参数自整定
QT color is converted to string and uint
Solution: intelligent site intelligent inspection scheme video monitoring system
Ble of Jerry [chapter]
Do you really think binary search is easy
When the Jericho development board is powered on, you can open the NRF app with your mobile phone [article]
22. Empty the table
08- [istio] istio gateway, virtual service and the relationship between them
Ble of Jerry [chapter]
Simulation of Michelson interferometer based on MATLAB
随机推荐
Simulation of Teman green interferometer based on MATLAB
esRally国内安装使用避坑指南-全网最新
Apache middleware vulnerability recurrence
Luogu p1836 number page solution
Mise en œuvre du langage leecode - C - 15. Somme des trois chiffres - - - - - idées à améliorer
C intercept string
Emo diary 1
TS 体操 &(交叉运算) 和 接口的继承的区别
Pre knowledge reserve of TS type gymnastics to become an excellent TS gymnastics master
Brief explanation of instagram operation tips in 2022
Qualitative risk analysis of Oracle project management system
Wonderful use of TS type gymnastics string
Is the super browser a fingerprint browser? How to choose a good super browser?
[cf gym101196-i] waif until dark network maximum flow
超级浏览器是指纹浏览器吗?怎样选择一款好的超级浏览器?
In the era of digital economy, how to ensure security?
TS 类型体操 之 循环中的键值判断,as 关键字使用
【Redis】NoSQL数据库和redis简介
数据治理:主数据的3特征、4超越和3二八原则
数据治理:微服务架构下的数据治理