I am getting lag spikes in my game that uses Unity 2022.1.19f1 and HDRP. The spikes seem to happen on random functions that get called throughout the frame - it’s as if it has nothing to do with the individiual function and the whole runtime has just frozen for 400ms.
(I also tested this on the latest LTS and found the same issue to happen, but it broke other stuff, so I reverted back to 2022.1.19f1)
Does anyone know any way to troubleshoot this? I am using await at rare times in my C# code, maybe that has something to do with it? But certainly not as frequently as these spikes are happening.
If anyone knows about any 3rd party profiling tools that will be more helpful than this unity profiler, or know what could cause freezes like this where the unity profiler is useless, let me know.
Note: These spikes don’t happen in the editor.
Seems like it was just a GC allocation issue.