Random frame drops when playing in levels

This has been a reoccurring issue, but I just remembered I could ask here.
So for a while now, I’ve had an issue where the frame rate drops drastically in every stage level. I’ve tried everything as far as;

  • Making variables for the EVERY cast node in a blueprint so it doesn’t have to be repeated
  • Unplugging Event BeginPlay and Event Tick from all their connections
  • Deleting actors in the level to reduce entity amount
    But yet there’s still lag.
    I have also noticed, when the player is defeated (reaches 0 health) almost all the lag is muted and gameplay is smooth. I have checked in blueprints where it looks to see if the player is defeated multiple times and I couldn’t find anything that could relate to the lag. Here’s an example:

During play


And in the editor

(If you think the lag is being caused by the excessive amounts of actors in the world, this is disproven because I did not have this issue during development of this stage, while these actors were being spawned, and it only started after I put in the code.)

Try using ‘ProfileGPU’ in the command line while playing, it should give a detailed overview of what’s causing this. If you can get me some more details from it, I can likely assist further. Though I will not be available here soon for several days.


Sorry if I don’t get back to you, but if this solves your problem, make sure to mark it as the solution.