当前位置:网站首页>Synergetic process
Synergetic process
2022-06-23 12:39:00 【First wife ash yuanai】
The teacher defined : Start another logical processing while the main thread is running , To assist in the execution of current procedures .
The official definition of : Xiecheng is a branch executive , Encounter conditions (yield return sentence ) Will hang up , Until the condition is met, it will be waked up and continue to execute the following code .
Points of attention :
1.Unity At every frame (Frame) Will deal with the coroutines on the object .Unity Mainly in the Update Post processing process ( Check whether the conditions of the cooperation process are met ), But there are also exceptions :
2. Synergetic process Update() It's the same , All are Unity The function that each frame pair will handle ( If any ). If MonoBehaviour Is active (active) State and yield Satisfy the condition of ,
Will execute the following code of the coroutine method . You can also find : If you call a coroutine in the early stage of an object , The collaboration will run immediately to the first yield return Statement place , If it is yield return null , Will be awakened again at the same frame .
3.Unity Of C# The return value of a coroutine in the code is usually IEnumerator( iterator ) type ,IEnumerator There are two ways to interface , Namely Current and MoveNext. We can simply think that :
A coroutine is a function that returns an iterator , At first the iterator's Current Point to the beginning of the function , Every time MoveNext,Current Point to the next yield return The value returned . The iterator method runs to yield return
When the sentence is , Will return a expression Expression and keep the current position in the code . The next time the iterator function is called, execution restarts from that location .
Unity What you do at each frame is : call coroutines ( iterator )MoveNext() Method , If you return true , Just continue from the current position .
边栏推荐
- ROS2知识(2):网络设施
- Photon网络框架
- 这两所985大学,共享同一位校长!校方:属实
- Deveco device tool helps openharmony device development
- 二维激光SLAM( 使用Laser Scan Matcher )
- Runtime application self-protection (rasp): self-cultivation of application security
- 解决:Argument type ‘String‘ expected to be an instance of a class or class-constrained type
- 协程
- If there is a problem with minority browsers, do you need to do a compatibility test?
- 判断测试结束的标准有哪些?
猜你喜欢

The list of open source summer winners has been publicized, and the field of basic software has become a hot application this year

mysql中innodb下的redo log什么时候开始执行check point落盘的?

二维激光SLAM( 使用Laser Scan Matcher )

HMS core video editing service has the ability to open templates, helping users get the same cool video with one click

国产化信息 | 爱可生与中科方德完成产品兼容互认证
![[introduction to UVM== > episode_7] ~ sequence, sequence item, sequencer, driver](/img/75/cd374bab8da2c133a0207a2472581f.png)
[introduction to UVM== > episode_7] ~ sequence, sequence item, sequencer, driver

Transformers are RNNs (linear transformer)论文阅读

Ecological Wanli database and Westone completed compatible certification to jointly build a network security ecosystem

Qt 知识:使用 QGraphicsPixmapItem类

Wallys/DR6018-S/ 802.11AX MU-MIMO OFDMA / 2* GE PORTS/WIFI 6e / BAND DUAL CONCURRENT
随机推荐
QT5知识:信号和槽的一些要点
数据中台稳定性的“四高” | StartDT Tech Lab 18
Halcon principle: one dimensional function_ 1D type [1]
The median annual salary exceeds 300000, and the salary of the first AI major graduate of Nanjing University is exposed
What should testers do if the requirements need to be changed when the project is half tested?
Deep thinking: in-depth analysis of some scenes in Gaia Altman and the philosophy and perception reflected
自己测试的范围内出现严重 BUG ,马上要上线,这种情况怎么办?
halcon原理:相关性匹配
【无标题】2022年压力管道巡检维护试题及在线模拟考试
Operation of 2022 tool fitter (elementary) examination practice question simulation examination platform
Halcon principle: correlation matching
With 32 qubits! Rigetti computing enters the UK quantum computing market
Hot spot of equity transfer: 93.75% equity transfer of Chongqing Jianke Construction Engineering Quality Inspection Co., Ltd
halcon知识:dyn_threshold的用法(划痕检测)
国产化信息 | 爱可生与中科方德完成产品兼容互认证
对象池框架
User behavior modeling
Oracle database's dominant position is gradually eroded by cloud competitors
二維激光SLAM( 使用Laser Scan Matcher )
Ros2 knowledge (1): start practicing robots