I noticed that when there is no lag the CPU is 11 - 12 ms. When is lag the CPU is 700 - 800 ms and 600 are for “EditorLoop”. I don’t understand why is RANDOM?
You should switch the Profiler target from Playmode to Editor to see what is going on inside the EditorLoop. The difference could be down to a number of things, but we can only guess as long as you only show cropped screenshots of the Hierarchy or Timeline view of the Profiler, while Profiling Playmode so that we can’t see the EditorLoop contents. The documentation says as much about the EditorLoop too btw
New messages make them bubble to the top again. You could have tried that first.
Anyways, no idea why it’s random. It could also be reliable and you just didn’t figure out the factor that makes it trigger. Maybe it’s due to the selection? In one screen you have the terrain selected… I don’t know and can’t tell you anything really from these screenshots, you need to Profile the Editor to get any idea on the what and why. Speculation is not a very effective troubleshooting technique here.
Thanks. A lot of users reported “EditorLoop” causing spikes and all of them received the same answer: “Your game won’t have this spikes when you build it”
I was going to say, that you were probably using the non convex mesh collider, in a way that Unity does not support. Or probably this is a unity bug. But looking at the error, I would say, that you’re either using the non convex mesh wrong, or if you are using it correctly, then this somehow seems to be, an odd unity physics bug issue.
As for the texture rectangle problem, I found this old post.
Check the solution in the last post at the bottom.
This might be a long tiring way to solve that problem, but it might work in your case. Thanks to trickyspark for coming up with this solution.