Spawning causes FPS drops


I have a custom actor that will spawn x amount of enemies at beginplay.

It worked fine in 4.14, but now it will cause a constant FPS drop, and reach 10 fps in a few seconds…
I think it comes form the SpawnActor node, I tried spawning even inert static meshes, and I will still have the drop in FPS…

Is it an error on my part? Or a bug?

Edit: It’s weird, I think I got it wrong on the static meshes. I think it does it to characters who have a controller…
I’ll keep on toying around!

Hey rumpelstilskin,

I ran a quick test where I spawned the third person character from the third person template several times on event begin play on a new default map using the level blueprint. I didn’t notice anything bad though.

Would you mind testing if this framerate drop happens with sample content in a blank/template project?

At least that would tell you if your problem is specific to your scene/assets.

Ok, so I investigated more on the problem, and it seems to be caused by the fact that I cannot access my spawned character from my controller!

Basically, my character knows it has a controller, but my controller doesn’t know about his Character, so when I cast my character from my controller, it will always fail on beginplay… My drop in FPS is due to my controller trying to access my character ( who is a stored variable declared at begin play… )

EDIT: I just solved the problem: for whatever reason, casting to my character form my controller on begin play doesnt work anymore on begin play… so I just added a delay node as the very first instruction of my begin play, and now it works… Dirty, but it will have to do…

And the problem of casting my character from my controller is present even in an empty third person project…

Sorry for the typing mistakes, I can finally go to sleep