Achievements & Stats for Steam
Welcome to the Steam Achievements documentation! We’re glad you decided to purchase this asset and we hope it helps you achieve your goals. If you have any questions, please don’t hesitate to reach out to us at email@example.com. And if you could, please consider rating the package or leaving a review on the asset page. This will help us grow and improve the asset.
The asset contains 2 main scripts which allow you to configure its usage. These are:
This script is responsible for loading the Steam runtime and should be attached to an empty GameObject in the scene.
||The Steam application id to use. The default is 480 which is Steam’s test id. For more information please review Steamworks Applications||
This script should be attached to an empty GameObject. At start it will retrieve the stats and achievements from the Steam servers and display them on the editor. It can be referenced and called in order to get achievements, get stats, trigger a specific achievement, or update and set stats.
||The achievements loaded from the Steam servers.||
The asset includes a demo scene that loads all the achievements from the default Steam appid (480, spacewar). It provides a small example of how to use the API to load achievements into the Unity UI, displaying names, icons and a button to trigger them.
Script to fill the achivements UI from the achievement list. It retrieves the results from
SteamAchievementAndStats.cs (if available) and creates rows for them inside a scrollable view.
Class that represents a UI row for an achievement entry. It just holds references to it’s children UI elements, for easy access.
If the leaderboard is not loading, it could be because Steam is not running on the computer and the game cannot connect to Steam services.
If the leaderboard is not loading, it could be because of an incorrect or disabled appid. The demo scene uses Steam’s default appid for testing (480), also known as the space war demo game app id. During development, you can use the test app id, but to release your game, you will need your own application. Please see Steamworks Applications for more information on creating an application and getting your appid.
Steam works by injecting code into the process that calls it. While it should work fine most of the time, Unity does not recreate the process when restarting a scene, which could result in Steam loading incorrectly. Restarting the Unity Editor can sometimes resolve these issues.
We are a small company focused on building tools for game developers. Send us an email to firstname.lastname@example.org if interested in working with us. For any other inquiries, feel free to contact us at email@example.com or contact us on the discord
Sign up to our newsletter.
Want to receive news about discounts, new products and updates?