Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Heavy lags due to Steam integration?

Discussion in 'Editor & General Support' started by MJost, Aug 5, 2021.

  1. MJost

    MJost

    Joined:
    Jul 28, 2015
    Posts:
    11
    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!

    upload_2021-8-5_10-52-1.png
     
  2. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    575
    I'm having the same problem. Were you able to fix it?
     
  3. Mafutta

    Mafutta

    Joined:
    Sep 30, 2014
    Posts:
    45
  4. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    575
    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.
     
    Last edited: Aug 30, 2021
  5. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    575
    I know this is a bit of a drastic solution, but I reinstalled Windows and the problem was gone.
     
  6. MJost

    MJost

    Joined:
    Jul 28, 2015
    Posts:
    11
    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...
     
  7. Nonakesh

    Nonakesh

    Joined:
    Aug 27, 2011
    Posts:
    575
    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.