MultiTask enables multi-threading in Blueprints in the cleanest and the most efficient way.
One Latent Node, multiple branches.
Keep your blueprints simple with MultiTask.
MultiTask is now a reflection of the Pro version but limited in it’s functionality. There is no backwards compatibility with previous MultiTask Plugin. If you want the legacy plugin, you have to get the version for UE4.20
“All the functionality is demonstrated and explained in the files located in plugin’s Content folder.” Some usage example can be found there.
When using threads from blueprint, the only thing that you’ll have to take in consideration is loop iteration limit.
If you’re using loops and/or sub-loops you’ll need to do some math calculations, and if all your loops iteration are higher than the project’s loop iteration limit, either you increase that limit by going to Project Settings-> Engine->General Settings-> Maximum Loop Iteration Count, or by calculating and diving your iterations to how many threads you’re using and the result will be the amount of iterations per tick.
You’ll have to use the macros in MTaskThread that limits the iterations per tick.
Limiting the iterations per tick with the provided macros will affect the time the thread completes it’s job.
Hope i somehow explained.
Check the included example. If you’re still having troubles you can post it here.
Multi task executes OnCancel Branch in DoAsyncTask when game ends(PIE, Standalone, Packaged etc). This allows you to prevent crashes in case you forget to cancel on End Play. However, you’re still responsible for OnCancel branch implementation in order to safely end the current work (if any).
New WaitToFinish function in Worker Library that blocks Game Thread until the thread task is done.