Forum
Parallel for Unity can make your games run faster!
*Includes Perlin Noise Example
What is Parallel for Unity?
- Loops run over x2 faster
- Unlocks the power of multi-thread CPUs
- Divides work across multiple threads
- Executes for/foreach loops in Parallel
- Executes lambda expressions in Parallel
Why is Parallel for Unity useful?
If you have expensive thread-safe loops you can easily run them in Parallel without writing complex thread management code.
How? Replace:
for(int i = 0; i < max; i++){ ... }
Parallel.For(0, max, (i) => { ... });
---
foreach(var item in items) { ... }
Parallel.ForEach(items, (item) => { ... });
---
Method1();
Method2();
Parallel.Invoke(
() => Method1(),
() => Method2());
Intended to allow using Parallel with Unity 5 .Net 3.5 limitations
Want to spawn objects in Parallel?
Async Scheduler
Want an easy way to manage threads?
Task for Unity