Skip to content

User Examples

This section provides practical examples of using the Steam User feature 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 Steam 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 Steam 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 Steam 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.


Getting a Player's Steam ID from PlayerState

The plugin maintains a replicated identity mapping for a managed Steam multiplayer game, allowing UI and gameplay systems to associate Unreal players with real Steam User IDs.

  1. Obtain the target player's PlayerState (for example, from the game state player array or the character's PlayerState).
  2. Call Get Steam User ID From Player State.
  3. Use the returned Steam User ID only when Success is true.
  4. Pass the ID to Set Steam Player Voice Actor, Get Steam Player Voice Level, or other Steam-user-specific functions as needed.

If Success is false immediately after connection, wait for PlayerState/identity replication and retry. Do not invent or assume a Steam ID from a player name or a local index.

For server-side logic that has access to the target PlayerController, use Get Steam User ID From Player Controller. Remote PlayerControllers are not available on ordinary clients; prefer the PlayerState lookup there.

This identity mapping is part of managed Multiplayer, not a general lookup for arbitrary Unreal players outside a managed Steam game.


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
  • PlayerState/PlayerController lookups return a separate Success flag; the identity mapping may arrive after the player object