Steam achievements in Unity

1 min read

By Eduardo Orellana ·

For Steam achievements in Unity: create and publish them in Steamworks, then from C# set one and store stats. With Steamworks.NET that is SteamUserStats.SetAchievement("API_NAME") followed by SteamUserStats.StoreStats(); with Facepunch.Steamworks it is new Achievement("API_NAME").Trigger(). The overlay pop-up appears only once the stats are stored, and only while the game runs under Steam with your App ID.

Set, then store

Steam keeps achievements in a local cache until you store it. Set an achievement without storing, and nothing reaches Steam and no pop-up shows. Every engine's integration has the same two steps.

In Steamworks

Create each achievement with an API name, a display name, a description and two icons, plus any stats; then publish the change. The game does not have to be released.

Steamworks.NET

After SteamAPI.Init() succeeds (the usual SteamManager does it):

if (SteamManager.Initialized) {
    SteamUserStats.SetAchievement("FIRST_WIN");
    SteamUserStats.StoreStats();
}

Facepunch.Steamworks

After SteamClient.Init(appId):

var achievement = new Steamworks.Data.Achievement("FIRST_WIN");
achievement.Trigger(); // sets and stores

When the pop-up does not show

  • Stats were not stored after setting.
  • The achievements were not published in Steamworks.
  • The API name does not match exactly.
  • The game is not running under Steam, or the App ID is wrong.

Where Flockbay fits

Flockbay builds games on Godot, where its AI writes GodotSteam achievements on request. Its publishing tools work for a Unity game too, free in beta until 1 December 2026.

Flockbay

The free AI game maker for Windows, macOS and Linux.