I recently encounter heavy lags in my game that appear every few seconds. When I profile the game I see that a call to SteamAPI_ManualDispatch_GetNextCallback() is causing these lags. Or am I misinterpreting the profiler? When I disable the steam integration it gets a lot better. I’m using the Facepunch C# wrapper. Does anyone have experience with this issue or see a possible solution?
Here is an intro video for Steamworks V2 and why it might be easier/better than FacePunch but I have not actually compared them. Sounds promising however in conjunction with bootstrapping instead of don’t destroy on load.
I kind of doubt that this asset is calling the manual dispatch function differently, especially as Facepunch is doing it exactly as described in the Steamworks documentation.
At the moment steamworks is doing absolutely nothing in my project. Well, except for causing lag spikes of course.
Edit:
Just tried it on a second PC and the problem is gone, so it might have some external reason.
I rewrote my implementation to use Steamworks and can confirm that the problem stayed the same. Clueless about what’s causing it. I can also confirm that it doesn’t happen on other machines. But on the machine where it happens, I don’t have the same issues with games I play on steam. So it’s still Unity related…