Spawn single Actor stuttering

Hi cummunity, i’ve coded via BPs a simple spawner. At the moment i’m spawning 1 actor every 1 second but that is only for testing. Even if i spawn only 1 actor in total, at the time of spawn i get a frame drop.
I’ve never used profiler until now so i don’t get much about what am i seeing.

Trying to guess, but seems the actor i’m spawning has too much logic at begin play maybe? Actually i can’t imagine how to lower the amount of functions because they are all essential for gameplay reasons.
There isn’t any logic under the Tick function.
Triangles are capped at 7k.
No clothing.

Thank you in advance for your help, i’ll provide more images if you want to see something more specific.

Hi Bravoebello,

Spawning actors is never fast, but yeah it’s not usually that slow either.

A good way around it is to Pool your actors - create them at the start of play, then grab from the pool when you need them and put them back when you’ve finished.

It’s not hard to build something like this - C++ is faster and you do see speedups for using it in situations like this.

I actually have a plugin on the marketplace that does Actor/Component Pooling (and distributed spawning, and instancing) which makes it easy to do if you are interested in a already written and tested solution:

1 Like

Yeah i was thinking about pooling. I’ve tried to put them inside a streaming level but seems heavy aswell. I’m going to check your solution surely! Thank you very much.

1 Like