Steam Achievements Get, Set and Store

this always returns 0

SteamUserStats.GetStat(stateName, out tmp);

Code to set and store

SteamUserStats.SetStat(stateName, value);
        SteamUserStats.StoreStats();

it is for progress Achievements like do 10x…

GameInstance.Instance.achievementManager.UnlockAchievement(AchievmentType.FirstAccomodation);
                var value = GameInstance.Instance.achievementManager.GetStat("TwentyAccomodation ");
                value += 1;
                GameInstance.Instance.achievementManager.SetStat("TwentyAccomodation ", value);
                if (value >= 20)
                    GameInstance.Instance.achievementManager.UnlockAchievement(AchievmentType.TwentyAccomodation);

Strangely enough it is working for 1 achievement that was already unlocked, that returns the correct amount, but all others are stuck on 0

i can only test in editor since VS doesn’t want to break if i attach it to a debug build running in steam.

I have not used it myself, but could have something to do with not just saving but also publishing the stats and achievements, and having sufficient permissions in the game.

hey @ijmmai thanks for the reply.
the configuration on the steam page should be fine as they work(ed) for some. I double checked and all setups for progressing achievements seems to be the same as the one that worked.

I used “SteamManager” as per this tutorial and it works fine.

hey @SeerSucker69 Thanks for replying.
But as you can see in the code snippet i posted, i do exactly the same as in the tutorial. GetStat → Increment value → SetStat → StoreStat…

:face_with_spiral_eyes: ok nevermind, there was a space to many in the achievement string name! :sweat_smile: