当前位置:网站首页>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:不受缩放影响的每帧经过时间
边栏推荐
- MP3是如何诞生的?
- PLC Analog input analog conversion FC s_ ITR (CoDeSys platform)
- Implementation of macro instruction of first-order RC low-pass filter in signal processing (easy touch screen)
- Memory management summary
- MySQL learning notes - data type (numeric type)
- Temperature control system based on max31865
- Openresty current limiting
- 大神详解开源 BUFF 增益攻略丨直播
- Introduction to asynchronous task capability of function calculation - task trigger de duplication
- Guitar Pro 8win10 latest guitar learning / score / creation
猜你喜欢

Deep learning neural network case (handwritten digit recognition)
Redis的4种缓存模式分享
![[local differential privacy and random response code implementation] differential privacy code implementation series (13)](/img/fe/f6a13dcf31ac67633ee5a59d95149d.jpg)
[local differential privacy and random response code implementation] differential privacy code implementation series (13)

内存管理总结

C1 certification learning notes 3 -- Web Foundation

這幾年爆火的智能物聯網(AIoT),到底前景如何?

Cann operator: using iterators to efficiently realize tensor data cutting and blocking processing

Preliminary exploration of flask: WSGI

Redis 解决事务冲突之乐观锁和悲观锁

Redis 发布和订阅
随机推荐
Redis 解决事务冲突之乐观锁和悲观锁
输入宽度!
go-zero微服务实战系列(九、极致优化秒杀性能)
信号处理之一阶RC低通滤波器宏指令实现(繁易触摸屏)
Flutter reports an error no mediaquery widget ancestor found
[local differential privacy and random response code implementation] differential privacy code implementation series (13)
智能客服赛道:网易七鱼、微洱科技打法迥异
hexadecimal
Force button brush question 01 (reverse linked list + sliding window +lru cache mechanism)
Width accuracy
Why do domestic mobile phone users choose iPhone when changing a mobile phone?
宽度精度
Introduction of text mining tools [easy to understand]
Quick introduction to automatic control principle + understanding
Openresty redirection
MP3是如何诞生的?
Live broadcast preview | PostgreSQL kernel Interpretation Series II: PostgreSQL architecture
When synchronized encounters this thing, there is a big hole, pay attention!
Techsmith Camtasia Studio 2022.0.2屏幕录制软件
Preliminary exploration of flask: WSGI