Lucky Raccoon Games
  • Start Here
  • Really Simple Steam Integration
    • Setup
    • Running Demo Scenes
    • Leaderboards
      • Setup
      • Initializing Leaderboards
      • Submitting Scores
      • Retrieving Leaderboard Data
    • Stats and Achievements
      • Setup
      • Unlocking Achievements Directly
      • Unlocking Achievements from Stats
    • Cloud Save
      • Setup
      • Saving and Loading Data
    • Friends List
      • Setup
      • Getting Friends Data
    • Drag & Drop UI Components
    • Troubleshooting
    • Useful Links
  • Really Simple Tutorials
    • Setup
    • Running Demo Scenes
    • Tutorial Screen
      • Categories
      • Items
      • Setting up the screen with your data
      • Tutorial Manager anatomy
    • Tutorial Popup
      • Showing and hiding Popups
      • Tutorial Popup anatomy
    • Integrations
      • New Input System
    • Troubleshooting
  • Support
Powered by GitBook
On this page
  1. Really Simple Steam Integration
  2. Friends List

Getting Friends Data

To get the friends' data, do as in the code snippet below:

[SerializeField]
SteamFriendsList steamFriendsList;

IEnumerator AsyncGetFriendsList()
{
    List<SteamFriendEntry> friends = steamFriendsList.GetFriends(true);
    
    // Wait a while for the avatar images to load or ignore this line
    // if you only want to get the names of the player's friends
    yield return new WaitForSeconds(1.5f);

    foreach (SteamFriendEntry steamFriend in friends)
    {
        // Do what your imagination tells you
    }
}

An advanced working example of the Friends List module can be found at Assets > Lucky Raccoon Games > Really Simple Steam Integration > Demo > 04 Friends List

PreviousSetupNextDrag & Drop UI Components

Last updated 2 years ago