Comment on page
Understanding Steam Stats and the Heathen Engineering tool kit
Please note that you must call StoreStatsAndAchievements to apply changes to the Steam backend, and thus cause the notification to pop up.
Stats work much like achievements however they cannot be imported from Valve directly so you must add your stats to your system manually.
Once you add a sate you need to provide its API name exactly as you created it in the Steam Developer Portal.
public IntStatObject myIntStat;
This will make a new reference slot you can drag and drop your stat into on the Unity inspector for that object.
You can now drag the desired stat object from your Steam Setting into that slot.
Your script can now perform actions in relation to that stat
// Read the stat value
Debug.Log("Value is " + myIntStat.Value);
// Set the stat value
myIntStat.Value = 42;
// Store the stat values (effects all stats)