Unity Editor Problems

Hello, I am having this issue for a long time now,

After a while of using unity on a session, during runtime the game starts lagging like 0.5 to 1 frames per second, every single velocity value sets to NaN and it makes it impossible to test the game. If I build the game and test it using the .exe file everything is alright with a normal build (I’m 100% it’s not my code at fault(I think)).

I have attached a gif showcasing the issue

4424254--403657--EditorLag.gif

Have you tried the Profiler and enabled “Profile Editor” already, to hopefully get some insights what’s causing these issues?

Profiler overview

Introduction to the Profiler

Hello,

I came back with a picture from the profiler, right when it starts lagging

4429711--404692--Capture.PNG

4429813--404713--upload_2019-4-15_12-36-4.png

After adding this I don’t get NaN errors anymore. This is both a good thing and a bad thing. A bad thing because the lag is still happening. It gets frustrating