> For the complete documentation index, see [llms.txt](https://docs.luckyraccoongames.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.luckyraccoongames.com/really-simple-steam-integration/leaderboards/initializing-leaderboards.md).

# Initializing Leaderboards

Before submitting scores or retrieving data, you will need to initialize a leaderboard. To do this, use the code below:

```csharp
[SerializeField]
SteamLeaderboards steamLeaderboards;

IEnumerator AsyncInitializeLeaderboard() {
    steamLeaderboards.SetLeaderboard("My Awesome Leaderboard", 
        ELeaderboardSortMethod.k_ELeaderboardSortMethodDescending,
        ELeaderboardDisplayType.k_ELeaderboardDisplayTypeNumeric);
    
    while (steamLeaderboards.IsSearchingForLeaderboard)
    {
        yield return null;
    }
    
    Debug.Log("Leaderboard Initialized!");
    
    // Do what you want from here
}
```

{% hint style="info" %}
The method AsyncInitializeLeaderboard() is a Coroutine because calls to the Leaderboard API are asynchronous
{% endhint %}

{% hint style="warning" %}
**Warning!** If the leaderboard "My Awesome Leaderboard" does not exist, it will be created in Steamworks. This is especially useful when you don't want to manually create leaderboards in Steamworks website
{% endhint %}

**Cool!** Once we have the leaderboard in our hands, we can submit scores or retrieve data.
