I am making an Open World game with Unreal Engine for the past 2 years and i need some help or advice regarding activating and deactivating AI characters for an open world game.
The desired goals are the following:
1)Spawning 10.000 inactive AI actors across the level
2)Use behavior trees
3)Activate and deactivate the actors based on distance from a player
I have made a setup that can spawn 200 actors with reasonable fps and then activate and deactivate visibility,collision,tick and logic based on distance
My challenge is in goal 3
My benchmark is spawning 10.000 empty actors and that is giving me 120 fps
As long as i spawn and make these 200 AIs inactive my performance falls to 40fps
My problem is that i cannot determine what is left that still costs performance.
I am disabling the following:
4)Stoping AI Logic
Are there any additional stuff i could remove in order to make the Actors cost close to Zero but still holding the variables ?