How To Use Loops Inside Unity's Update Methods
An example of how not to use loops inside Update, along with a simple example of offloading calculations to a background thread using Awaitable, which is supported from 2023.1. However, it is not recommended for shorter-lived operations, such as parallelizing computationally-intensive algorithms. To maximize the use of multi-core CPUs and parallelize your algorithms, the C# Job System is recommended.
https://giannisakritidis.com/blog/Looping-Inside-Update/
Read more about Awaitable: https://docs.unity3d.com/2023.2/Documentation/Manual/AwaitSupport.html
#awaitable #async
Post #2345
703