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.
I’m actually away for some days and I can’t test it, this is why I asked, I will surely download it and try it when I come back home, really thanks for sharing.
Currently trying to wrap my head around it’s whole system. The blueprint example is just a bit more complicated than I can understand.
Say for example I have a bunch of actors in my level that are each running their own arrays, math, etc. How would I get these actors to multi thread?
Does anyone know if someone made a video or even just some more in-depth comments showcasing an example of how to use and setup a multi thread project using the nodes?
Fixed a bug where On Complete and On Cancel branches in Do Async Task node were not guaranteed to execute on game thread (bug came in effect with version 1.1.9).
Hi, using a Delay node or any other latent node in Task Body switches the execution path to Game Thread. The node isn’t ignored but due to how engine works it executes on Game Thread.
Question is this just for doing Async work or truely applying work to another? Is this using all native unreal code for Async/threading or third party code?
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.