Search Unity

Third Party Unity Steamworks Uninitialized error after returning to the offline scene with Mirror

Discussion in 'Multiplayer' started by LegoDude, Nov 18, 2022.

  1. LegoDude

    LegoDude

    Joined:
    Nov 14, 2015
    Posts:
    12
    To preface this, my problem is almost exactly the same as https://stackoverflow.com/questions...onexception-steamworks-is-not-initialized-aft
    I have a game that utilizes Unity Mirror for multiplayer and FizzySteamworks as the transport. When I launch the game I can go through the game as expected until I wish to leave the lobby. When I try to press my leave lobby button, it calls Manager.StopHost() which then takes me to my offline scene. However, when I try and start a new lobby/game, I get the error: InvalidOperationException: Steamworks is not initialized.

    Now as I understand, because my NetworkManager is in my offline scene, when I switch back to the offline scene, something (SteamManager maybe or NetworkManager or something else, I haven't found what) destroys my old NetworkManager as to prevent having duplicates, which makes sense. The problem is that the new one/one from the offline scene is not the one I should be using/isn't being initialized causing the error.

    The fix described in the similar post does not work for me as Persist Network Manager To Offline Scene is no longer an option in the Mirror NetworkManager. I have tried finding where the old one is destroyed (No luck), as well as trying to reset/re-initialize steam in some way, also to no avail.

    Are there any recommendations on how I can either fix either destroying the old NetworkManager or fix the steam initialization failure? Thanks in advance.