Reply To: Reusing pooled FSM allocates memory whereas BT doesn't

NodeCanvas Forums Support Reusing pooled FSM allocates memory whereas BT doesn't Reply To: Reusing pooled FSM allocates memory whereas BT doesn't

#11362
jakko
Participant

That sounds great, looking forward to that!

I also found that most of the actions and conditions interfacing with the agent’s code allocate memory every tick. Making them unusable for me. Probably because of the boxing and unboxing of parameters, I didn’t dive that deep into the code to figure that out.
So I have created a set of ActionsTasks and ConditionTasks that use delegates and typed parameters that don’t allocate the additional memory when used. Also they are a bit faster as the interface is less abstract.

The drawback is that they are not as flexible as the included Script Control tasks, but 9 out 10 times I’m interfacing with fairly simple methods using no parameters, or just one. So far I’ve used them on desktop, iOS (Mono and IL2CPP) and WebGL without any problems.

I could send them to you if you like.

Best,
Jakko