Hi all!
I have a question about optimizing to instantiate many enemies in my mobile scene.
I have a controller that is instantiating enemies every so often.
What I do is instantiate all the enemies when loading the scene and disable all its components
When the controller wants to instantiate an enemy at that moment, what he does is activate that enemy and place it in the corresponding position and enable all its components.
When I try the application the first time when activating enemies there is a high peak of half a second that stops and then continues.
But I try for the third or fourth time this lag is no longer produced.
What can be due?
What is the best way to go instantiating enemies from time to time and that stoppages do not occur?
Thanks!