EnableBehaviour taking a long time

#1
Hi!

We've been having trouble with trees initialization. Basically we have relatively big trees and when doing EnableBehaviour on +50 enemies. It's just taking a very long time and it freezes for 2-3 seconds (on a high end pc). Also if I try to delay init (wait between every enemy init), I still get major frame drops (it is much worse on consoles). It's been even worse since last update (we've had to revert to a previous version).


Our game is a die / repeat kind of game so hiding this time in a loading screen doesn't really do it either. Is there a way to have it be quicker ? An option I missed? or maybe we are doing something wrong? Our setup is a master tree with a bunch of linked sub behaviour trees, but I tried having them all in one tree to no real changes. We are using the Binary serialization option. Is there a way to initialize ONE behaviour, pool it, and then share it?

I figured maybe someone here had a similar problem!

Thanks!
 
Top