Steamworks.NET icon indicating copy to clipboard operation
Steamworks.NET copied to clipboard

SteamManager Callback Dispatcher Not Initialized After Scene Load

Open Kad0n opened this issue 10 months ago • 0 comments

When loading from the menu scene (where SteamManager is initialized) into any other scene, the following error occurs: InvalidOperationException: Callback dispatcher is not initialized. Steamworks.CallbackDispatcher.RunFrame (System.Boolean isGameServer) (at Assets/com.rlabrecque.steamworks.net/Runtime/CallbackDispatcher.cs:201) Steamworks.SteamAPI.RunCallbacks () (at Assets/com.rlabrecque.steamworks.net/Runtime/Steam.cs:185) SteamManager.Update () (at Assets/Scripts/Steamworks.NET/SteamManager.cs:173)

Returning to the menu scene causes all Steamworks features to stop working, including the overlay, achievement granting, and displaying the username and profile picture. (All of which work on initial run of the scene)

Steps I take to Reproduce:

Start the game in the menu scene where SteamManager is present and on see on instantiation SteamManager is set as DontDestroyOnLoad. Load into any scene without SteamManager object originally being part of the scene (to prevent duplicates). SteamManager object still under DontDestroyOnLoad Observe the console error regarding the callback dispatcher about once a frame. Load back to the menu scene. Notice that all Steamworks features are no longer functional.

Expected Behavior:

SteamManager should persist across scene loads without losing callback dispatcher functionality. Steamworks features (overlay, achievements, user data) should remain functional when returning to the menu.

Actual Behavior:

InvalidOperationException occurs upon loading any other scene. Steamworks features are broken when returning to the menu scene.

Unity 2022.3.9f1 DX11 Steamworks.NET 2024.8.0

Kad0n avatar Feb 24 '25 18:02 Kad0n