How to do things like StartCoroutine in ue4?

I see your id is Chinese so I’ll use Chinese to answer first and if you’re not please comment and I’ll translate to English

我想你说的应该是指“协程”机制,即比线程更加轻量的并行方案。但是很遗憾由于C++是一门非常底层的且非常重视效率的语言,因此并没有直接性的支持协程机制。你有以下选择:

  1. 使用线程或者TaskGraph作为并发方案。从而让任务可以并行化。具体可以参考:TaskGraph:https://docs.unrealengine.com/latest/INT/API/Developer/TaskGraph/index.html;线程:https://wiki.unrealengine.com/Multi-Threading:_How_to_Create_Threads_in_UE4

  2. 自己实现线程机制。