User Examples
This section provides practical examples of using the Steam User subsystem to retrieve information about the local player and other Steam users, display avatars, and perform basic user-related checks.
All examples below are shown using Blueprint nodes, with equivalent functionality available through the C++ API.
Getting Local User Information
This example demonstrates how to retrieve information about the local Steam user.
Using the local user getter nodes, the game can access the Steam ID, persona name, persona state, and the full identity structure of the currently logged-in user.
The Get Local User Identity node returns an aggregated FSteamUserIdentity structure, which includes the user’s Steam ID, display name, and current persona state.
This approach is typically used during game startup or when initializing player-facing UI, such as profile panels, main menus, or multiplayer lobbies.
Getting Identity Information for Another User
This example shows how to retrieve identity information for another Steam user using their Steam ID.
The Get User Identity node performs an asynchronous request and returns a FSteamUserIdentity structure through the On Success callback.
This is commonly used when displaying information about friends, lobby members, or other known players.
Only friends or previously encountered users are guaranteed to return identity data. If the information is unavailable, the On Failure callback is triggered and should be handled accordingly.
Downloading a User Avatar
This example demonstrates how to download and display a Steam user avatar.
The Get User Avatar node is called with a target FSteamUserID and an avatar size selected from ESteamAvatarSize.
The operation is asynchronous and returns a UTexture2D through the On Success callback, which can be directly assigned to UI elements such as image widgets.
This approach is commonly used for friends lists, lobby member panels, scoreboards, or profile screens.
Avatars may not be available for all users, and the returned texture should typically be cached to avoid repeated downloads.
Important Notes
- Identity information is guaranteed only for friends or known users
- Avatar textures may be unavailable and should be cached when successfully loaded
- Always validate user IDs before using them in requests
- Local user information is available immediately and does not require network communication