当前位置:网站首页>Basic functions commonly used in unity
Basic functions commonly used in unity
2022-07-18 11:41:00 【Still work hard!】
Awake(): Called when the current control script instance is loaded , Used to initialize ;
start(): The current control script is executed for the first time Update() Pre invocation ;
Update(): Once per frame ;
FixedUpdate(): Execute once every fixed frame , and Update() The difference is that FixedUpdate() Is the execution of rendered frames , If rendering efficiency is low ,FixedUpdate() The number of calls will decrease .FixedUpdate() It is more suitable for the calculation of physical engine ,Update() It is more suitable for control .
LateUpdate(): Call after the execution of each frame , That all the Update() Call... Only after , It is more suitable for the execution of command script . It is often used to follow the camera , That is, follow up the camera after all operations , Otherwise, it is easy to appear that the camera has followed up , And there are still some operations in the scene that have not been performed .
Reset(): Click... In editor mode reset Button to call , It is often used for initialization of debugging ;
OnBecameInvisible()、OnBecameVisible(): When script host ( No ) Called when displayed by any camera ;
OnCollisionEntry()、OnCollisionExit()、OnCollisionStay(): Check two Impactor Collide 、 Exit collision 、 Call when staying ;
OnTriggerEntry()、OnTriggerExit()、OnTriggerStay(): Check two trigger Collide 、 Exit collision 、 Call when staying ;
OnParticleCollision(): Triggered when particles hit the collider ;
OnDisable()、OnEnable(): Triggered when the script host is enabled or disabled ;
OnGUI(): draw GUI Trigger when , Generally used for drawing GUI menu ;
Mouse monitoring events , When the mouse and GUI Or when the collision body interacts :
OnMouseDown(): Trigger when the mouse is pressed ;
OnMouseDrag(): When the mouse is pressed , Every frame calls ;
OnMouseUp(): Trigger when the mouse is raised ;
OnMouseEnter(): Move the mouse to trigger ;
OnMouseExit(): Triggered when the mouse moves out ;
OnMouseOver(): When the mouse is on the game object , Every frame triggers .
OnApplicationFocus()、OnApplicationPause()、OnApplicationQuit(): When the application loses focus 、 Pause 、 Call... On exit ;
OnConnectedToServer()、OnDisconnectedFromServer(): Connect / Called when the server is disconnected ;
OnFailedToConnect()、OnFailedToConnectToMasterServer(): Call... When the connection fails .
Unity The life cycle of the basic function in

边栏推荐
- Meshlab之插件式开发
- Flink (I) overview
- Installation method of memory module on dual channel (Dual CPU) server motherboard
- Quweihai: insisting on choosing and not giving up is the magic weapon to realize the original intention
- 【C语言】自定义类型总结
- 无线通信安全作业2
- 三级分类的数据表设计和构造API数据
- Financial industry open platform
- [MySQL] create a MySQL account and authorize the correct posture
- flutter showDialog弹窗
猜你喜欢

Flink (III) processing function

mysql报错 1142 - SELECT command denied to user ‘dev‘@‘localhost‘ for table ‘user‘ (已解决)

What is the once brilliant streaming media protocol RTMP? Can it be completely replaced? Yiwen takes you into the world of RTMP

What are the London Silver rules?

Talking about software defect management

Forco:全球首发,暴力增值,年度最佳币圈风口

【C语言】动态通讯录

Xunwei domestic development board three development boards worth starting with

On the value of software defect management
![(manual) [sqli labs44, 45] post character injection, blind injection, Stack Injection](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
(manual) [sqli labs44, 45] post character injection, blind injection, Stack Injection
随机推荐
02、RestTemplate学习笔记
解决内网环境下的钉钉告警通知——筑梦之路
Thinkphp5 read multiline text, read files, and split multiline text
Go read yaml's pit
Summary of process synchronization problems
Meshlab之插件式开发
JDBC connection to mysql8.0 driver
JVM briefly introduces GC garbage collection mechanism
喜事乐,一场蓄谋已久的购物新时代
A row of "cranes" in the clear sky: Chinese flying cranes with numbers as wings
内存管理:内存的分配与回收
Redis_Linux安装
C语言预处理命令【一】
如何基于知识图谱技术构建现代搜索引擎系统、智能问答系统、智能推荐系统?
无线通信安全作业1-无线通信安全最新消息
thinkphp5 读取多行文本、读取文件分割多行文本
不同的评估方法适合哪种机器学习模型?
Camera 画质调试,学习资料分享
Jol Core
Burning firmware of Hongmeng openharmony system for rk3568 development board