Leaderboards for Steam
Welcome to the Steam Leaderboards 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 firstname.lastname@example.org. 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 and holds the desired configuration for the leaderboard.
|Name for the leaderboard inside the Steamworks API. Set this to be a name that makes sense as part of internal development.
|Set the order for the leaderboard sorting. For positional based leaderboards, use Ascending. For high-score, use Descending
|Determines the types of data to be displayed with the leaderboard. Select from Numeric, Seconds or Milliseconds.
The asset includes a demo scene that loads a leaderboard from the default Steam appid (480, space war). It provides a small example of how to use the API to load leaderboard entries into the Unity UI, displaying names, scores, ranks, and avatars.
Script to fill the leaderboard UI from the Steam leaderboard. It retrieves the results from
SteamLeaderboard.cs (if available) and created rows for them inside a scrollable view.
Class that represents a UI row for a leaderboard 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 email@example.com if interested in working with us. For any other inquiries, feel free to contact us at firstname.lastname@example.org or contact us on the discord
Sign up to our newsletter.
Want to receive news about discounts, new products and updates?