Heavy lags due to Steam integration?

Hi everyone,

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?

Thanks!

I’m having the same problem. Were you able to fix it?

Have you considered not using FacePunch? See https://www.heathen.group/steamworks and also Bootstrap your game instead for best performance. Bootstraping | Heathen KB

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 know this is a bit of a drastic solution, but I reinstalled Windows and the problem was gone.

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…

I also never had the problem with any Unity games from steam, so it might either be a Unity editor problem, or we’re missing something.

1 Like