How to get or check steam achievment using Steamworks.NET ?

Hi,

I’m looking to use Steamworks.NET @ https://steamworks.github.io/snippits/ to get / set achievements in my game (to be released on Steam) but I am struggling to understand how to do so.

I have steam manager script added and steam initialises ok, so that is all good. But then I try to set one of my achievements via code:
SteamUserStats.SetAchievement(“achievement_name”);

But it does not seem to help/work.

Can anyone offer their input, or provide a very simple coed statement that I can use to set an achievement in Steam and secondly check if it is achieved. I would appreciate it very much.

Thanks

As a fyi, maybe to help other newbies like me:
I solved my issues , I was using the code correctly it seems, BUT even though I had the achievements set on steamworks I did not yet click the Publish button ! DOH, once I did that the achievements/code worked :slight_smile:

So a simple code sample to set an achievement is:
SteamUserStats.SetAchievement(“achievment_name”);

To check if one is set:
public bool Check_It;
Debug.Log ("Achievement: " + SteamUserStats.GetAchievement(“achievment_name”,out Check_It));

I am happy :slight_smile:

Hey again,
i’m trying to activate my (just added) achievements.
But when using SteamUserStats.GetAchievement(“name”,out Check_It));
It returns false.

Do i really have to publish the achievement just to test them?
That seems counterproductive to me …

I want them hidden for as long as they don’t work …