当前位置:网站首页>Unity脚本常用API Day03
Unity脚本常用API Day03
2022-07-04 14:13:00 【@夜魅】
常用API:Component、Transform、GameObject、Object、Time
1、API(Application Programming Interface):应用程序编程接口,是一些预先定义的函数。
2、Unity引擎提供了丰富的组件和类库,为开发者提供了非常大的便利,熟练掌握和使用这些API对于游戏开发效率提高很重要。
Component:
常用属性:gameObject、transform、collider、renderer......
常用方法:GetComponent、GetComponentInChildren、GetComponentInParent......
Transfrom:
常用属性:position、localPosition、parent、forward......
常用方法:Translate、Rotate、TransformPoint、Find、SetSiblingIndex......
GameObject:
常用属性:transform、activeInHierarchy、activeSelf、tag......
常用方法:AddComponent、Find、FindGameObjectsWithTag、Object.FindObjectOfType......
Object:
常用属性:name......
常用方法:Instantiate、Destroy、FindObjectOfType、FindObjectsOfType......
Time类:
1、从Unity获取时间信息的接口
2、常用属性:
time:从游戏开始到现在所用时间
timeScale:时间缩放
deltaTime:以秒为单位,表示每帧的经过时间
unscaledDeltaTime:不受缩放影响的每帧经过时间
边栏推荐
- How to match chords
- Redis 發布和訂閱
- 微博、虎牙挺进兴趣社区:同行不同路
- Korean AI team plagiarizes shock academia! One tutor with 51 students, or plagiarism recidivist
- They are all talking about Devops. Do you really understand it?
- mysql 联合主键_Mysql 创建联合主键[通俗易懂]
- 产品好不好,谁说了算?Sonar提出分析的性能指标,帮助您轻松判断产品性能及表现
- How to rapidly deploy application software under SaaS
- Redis publish and subscribe
- EventBridge 在 SaaS 企业集成领域的探索与实践
猜你喜欢
智能客服赛道:网易七鱼、微洱科技打法迥异
这几年爆火的智能物联网(AIoT),到底前景如何?
MySQL learning notes - data type (numeric type)
03 storage system
Luo Gu - some interesting questions 2
深度学习 神经网络的优化方法
5g TV cannot become a competitive advantage, and video resources become the last weapon of China's Radio and television
03-存储系统
IO flow: node flow and processing flow are summarized in detail.
Quick introduction to automatic control principle + understanding
随机推荐
C1 certification learning notes 3 -- Web Foundation
Cann operator: using iterators to efficiently realize tensor data cutting and blocking processing
Who the final say whether the product is good or not? Sonar puts forward performance indicators for analysis to help you easily judge product performance and performance
Redis 解决事务冲突之乐观锁和悲观锁
函数计算异步任务能力介绍 - 任务触发去重
Implementation of macro instruction of first-order RC low-pass filter in signal processing (easy touch screen)
ES6 modularization
unity update 协程_Unity 协程的原理
找数字
Huawei cloud database DDS products are deeply enabled
%s格式符
Decimal, exponential
Five minutes per day machine learning: use gradient descent to complete the fitting of multi feature linear regression model
Preliminary exploration of flask: WSGI
产品好不好,谁说了算?Sonar提出分析的性能指标,帮助您轻松判断产品性能及表现
selenium 浏览器(2)
.Net 应用考虑x64生成
Luo Gu - some interesting questions
Weekly recruitment | senior DBA annual salary 49+, the more opportunities, the closer success!
输入宽度!