当前位置:网站首页>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
边栏推荐
- Typescript interface and the use of generics
- [redis] Introduction to NoSQL database and redis
- js對象獲取屬性的方法(.和[]方式)
- [window] when the Microsoft Store is deleted locally, how to reinstall it in three steps
- 2022年Instagram运营小技巧简单讲解
- The difference between TS Gymnastics (cross operation) and interface inheritance
- Get the path of edge browser
- 21. Delete data
- Transformer principle and code elaboration
- Data governance: metadata management
猜你喜欢
JMeter performance test steps practical tutorial
Basics of reptile - Scratch reptile
datax自检报错 /datax/plugin/reader/._drdsreader/plugin.json]不存在
24. Query table data (basic)
22. Empty the table
21. Delete data
TS 类型体操 之 extends,Equal,Alike 使用场景和实现对比
Codeforces Global Round 19(A~D)
【Redis】NoSQL数据库和redis简介
Games101 Lesson 7 shading 1 Notes
随机推荐
Data governance: 3 characteristics, 4 transcendence and 3 28 principles of master data
继电反馈PID控制器参数自整定
2022年Instagram运营小技巧简单讲解
JMeter performance test steps practical tutorial
Solution: système de surveillance vidéo intelligent de patrouille sur le chantier
Webrtc series-h.264 estimated bit rate calculation
Iterator Foundation
软件开发的一点随记
洛谷P4127 [AHOI2009]同类分布 题解
. Net 6 learning notes: what is NET Core
Inspiration from the recruitment of bioinformatics analysts in the Department of laboratory medicine, Zhujiang Hospital, Southern Medical University
Simulation of Teman green interferometer based on MATLAB
[count] [combined number] value series
Notes on software development
Luogu p1836 number page solution
Hackathon ifm
jmeter性能测试步骤实战教程
Scala language learning-08-abstract classes
opencv学习笔记八--答题卡识别
Onie supports pice hard disk