You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I know that SteamUserStats.OnUserStatsReceived callbacks can pick up responses for other Steam apps. That's not the issue that I'm having. When I receive a callback, the appID received never matches my game's appID, even if the stats I received are the ones for my game.
To Reproduce
Steps to reproduce the behavior:
Call SteamClient.Init(my_app_id)
Add a callback to SteamUserStats.OnUserStatsReceived
Call SteamUserStats.GetCurrentStats()
When the callback is received, appID is always different from my game's appID, even for a response that is clearly for my game (Achievements match the ones I defined on the Steam partner page).
Calling Code
// GameControllerSpawner.AwakevoidAwake(){// Attempt to connect to Steamtry{SteamClient.Init(2258130);Debug.Log("Successfully connected to Steam client.");GameController.steamClientInitialized=true;}catch(Exceptione){Debug.Log($"Could not connect to Steam client: {e.Message}");}// Spawn the Game Controllerif(GameController.Instance==null)Instantiate(gameController);Destroy(gameObject);}// GameController.AwakevoidAwake(){// ... Irrelevant other initialization code ...if(steamClientInitialized){Debug.Log("Requesting Steam user stats.");SteamUserStats.OnUserStatsReceived+=OnUserStatsReceived;SteamUserStats.RequestCurrentStats();}}// GameController.OnUserStatsReceivedpublicvoidOnUserStatsReceived(SteamIdappID,Resultresult){Debug.Log($"Received stats for appid {appID.Value}; result = {result}");// if (appID.Value != SteamClient.AppId.Value) // Ignore stats received for other Steam apps.// return;if(result!=Result.OK)// Make sure query was successful.{Debug.LogWarning($"Failed to get user stats with status {result}.");return;}Debug.Log("Received Steam user stats.");varbuilder=newStringBuilder("The following achievements are available:");foreach(varachinSteamUserStats.Achievements)builder.Append($"\n{ach.Name}");Debug.Log(builder.ToString());}
Expected behavior
Callback for my game's stats has an appID that matches the appID of my game.
Desktop (please complete the following information):
OS: Linux Mint 21.3 Cinnamon
Unity: 2021.3.33f1
The text was updated successfully, but these errors were encountered:
Describe the bug
I know that
SteamUserStats.OnUserStatsReceived
callbacks can pick up responses for other Steam apps. That's not the issue that I'm having. When I receive a callback, the appID received never matches my game's appID, even if the stats I received are the ones for my game.To Reproduce
Steps to reproduce the behavior:
SteamClient.Init(my_app_id)
SteamUserStats.OnUserStatsReceived
SteamUserStats.GetCurrentStats()
Calling Code
Expected behavior
Callback for my game's stats has an appID that matches the appID of my game.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: