Using Steamworks.NET, Steam callbacks always fail. What am I doing wrong?
Hi,
I'm desperately trying to bring Steam-achievements into my (our) Unity-based game, using Steamworks.NET . After at first confidently trying my own approach, I now just copied the whole of 'SteamStatsAndAchievements.cs' from the example project, only replacing the example-achievements with the ones from our game.
Still, I don't get very far, since I always receive 'k_EResultFail' from Steam. SteamManager IS initialized and the call to SteamUserStats.RequestCurrentStats(); does return true. It's just that the callback 'OnUserStatsReceived()' always receives a FAIL. (If I try to send achievements anyway, 'SteamUserStats.SetAchievement(...)' immediatly returns false, and a callback is never received)
When trying out the example project, everything works just fine!
What I did do:
I have the steam-Client running, and I am logged in with an account related to the unreleased Steam-game in question (The Steam-Client correctly displays me as "in game")
I did define achievements on the partners.steam-site of our game (the same as in the enum)
I did apply SteamManager.cs and SteamStatsAndAchievements.cs to a GameObject in the game
The steam_appid.txt is there and contains the correct id
What might be reasons:
In SteamStatsAndAchievements.cs I deleted everything stats-related (except the methods and relevant calls), since we won't use stats in our game. Are stats required?
The partner.steam-site of our game is far from completed. It's almost only the achievements that are there, yet. Is there anything which absolutely has to be set up in there, in order to have the SteamAPI be able to run and handle achievements?
Else I'm clueless as to what's going wrong :( . And I'm on a tough deadline. Please help if you can!
Answer by Reign_of_Light · Jan 26, 2017 at 06:25 AM
Solved it! For anyone who gets this problem, too: It's not enough to just set up stats and achievements on the Steam backend. You need to "publish" them (which is not publishing the game). "Saving" isn't enough, without "publishing" Steam just doesn't know what you're talking about.
Also, make sure the Steam account you are testing with has sufficient rights to the game, as long as it is not public, yet.
thanx for this :) i've read through butt-load of documentations and here is the first time i've read that you actually have to publish the changes you've made in s$$anonymous$$mworks
O$$anonymous$$G Dead end, if it wasn't because of your comment I think I would be stuck forever
Your answer
![](https://koobas.hobune.stream/wayback/20220612105458im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Question about NavMesh and Rigidbody 0 Answers
How do GameObjects detect void Update and how to make my custom one. 0 Answers
Unity 2D game trigger event by game start 1 Answer
Assigning Asset Bundle in Script 2 Answers
Can't activate unity: License Error 0 Answers