Object Pooling is a last resort and completely unnecessary. Spreading the spawn across multiple frames entirely solves frame drop issues. With the above I can spawn 300 AI (I don’t even need 300 for my game) with little frame drops and I don’t have any of the memory leak risks of object pooling. I would rather just go for a proper ECS than waste my time on something like Object Pooling.
I also just destroy the actors and spread GC across multiple frames. This is now natively supported in UE5 (experimental) so it’s even easier to do. I also clear GC during downtime (load screens for example).
With that said Object Pooling STILL doesn’t solve this problem. To pool 300 actors you still need to spawn 300 actors. It only solves the problem of the NEXT 300.