Hi! I was looking forward to 5.6 to be able to run state trees on jobs. However, I have trouble finding how to do it.
I saw the recent Witcher 4 tech demo presentations on Unreal Fest and they claimed their StateTrees (probably even called through SmartObject slots) were running on jobs in parallel. They claimed they used the Mass framework.
I saw the new StateTreeAsyncExecutionContext.h/cpp with Weak and Strong contexts and my StateTrees are using those when I debug them. But everything is still running on Game thread, even when I use Mass framework. I also haven’t found any setting in editor that would cause the trees execute on jobs.
So I assume 5.6 brought only core support for StateTrees on jobs, but I have to implement it at least partially myself. Am I correct? Is there any documentation about that or some hints to what code pieces are necessary for that? I could try searching deeper in the code, but without at least some general knowledge about how it is supposed to work, that seems like a lot of unnecessarily wasted time with discutable outcome.
Also what are the limitations? Is it possible to run blueprint state tree tasks in parallel, if I make sure I use only thread safe nodes? From what I read in some code comments, can I execute only read-only state trees that guard / search / listen to something on jobs, but to start some movement / animation I have to schedule it on Game thread?
I would appreciate at least some general direction about what is necessary and where to start looking. If there is some documentation / guide I haven’t found or some is currently being made, that would be perfect.