0

This graph causes me to lose 60fps

Surrealism 2 months ago updated by Nikita 2 months ago 3

Hi, I've been noticing my game lags a lot lately and I realised this graph is causing 60FPS itself! Is there anything that I'm doing wrong? This is a graph that allows me to find the nearest enemy from the player character.

Continued

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):

probably cos you update and loop each  frame all graph when somthing in the list .  try to delay  0.2-1 second somehow

 2events from enemyfinder when it find smth  so less parralel updates

3  maybe  one more branch  when one enemy choosed  dont loop until it killed    or use  once for  loop   and when killed -event to reset

im not sure what method good - i like every x second and cooldowns  and probably fixed update not for this situations at all

Thank you for your reply. Not sure why, but somehow, with FixedUpdate and fixedDeltaTime, my character becomes super jerky when moving and the framerate doesnt really solve. With cooldown of .3f, the framrate is slightly better, by 10fps. I increased it to 1 second in the cooldown and the fps doesnt seem much different

i dont know then where can be a problem ) 

maybe somebody else can help