Synchronous operations that run within a coroutine still execute on the main thread. However, it’s important to remember that coroutines aren’t threads. In situations where you would like to use a method call to contain a procedural animation or a sequence of events over time, you can use a coroutine. This means that any action that takes place within a method must happen within a single frame update. In most situations, when you call a method, it runs to completion and then returns control to the calling method, plus any optional return values. In Unity, a coroutine is a method that can pause execution and return control to Unity but then continue where it left off on the following frame. A coroutine allows you to spread tasks across several frames.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |