Behavior Tree Limit?

MrQuaid

Member
Behavior Designer & UCC
Unity Version 2018.3.0f2

I have a relatively small level with 20 enemies, all using Behavior Tree. They pull from an external tree I created, pretty simple just a wander, if see player move to and attack, and if out of range go back to start location. With 20 enemies I get a frame rate of 10, and every enemy I kill gives me a better frame rate by 2. So 10 enemies give me a decent frame rate. I have also tried using internal tree with the same results. The enemies are already in the level so there is no spawning. I have also tried 20 of your agent nolans with the same bad frame rates.

My tree is a 3rd the size of your agent nolan tree, is there something I am missing. I need at least 20 enemies active at one time and in close range of the player. I attached a screen shot of the profiler. I apologize but I am not super familiar with the profiler myself. Oh my scene only has a few rocks, player and 20 enemies.

1550634551195.png
 
If you are using UCC2 as your AI (Enemies) you can't put on scene 20 AI's at the same time regarding UCC2 performance right now. On my case on a i7 6 cores and gtx1080 I can handle only around 5-8 AI to get a decent performance.
I have a very long external tree and BD performs quite well (as far as I know), the problem is related to UCC2 performance.
Justin said he was going to write a guide to get a better performance for each Agent disconnecting some settings depending of the distance to the player (Level of Detail).
 
Thanks, yeah I have a pretty decent rig so I thought maybe I was missing something. I may look at other ai options for now as I need at least 20, preferably more. Thanks again for the info.
 
Top