Class SteamNetworkUtils
- Namespace
- SteamNetworkLib.Utilities
- Assembly
- SteamNetworkLib.dll
Utility methods for Steam networking operations.
public static class SteamNetworkUtils
- Inheritance
-
SteamNetworkUtils
- Inherited Members
Methods
FormatLobbyType(ELobbyType)
Formats a lobby type for display.
public static string FormatLobbyType(ELobbyType lobbyType)
Parameters
lobbyTypeELobbyTypeThe lobby type.
Returns
- string
Human-readable lobby type string.
FormatSteamResult(EResult)
Formats a Steam result for display.
public static string FormatSteamResult(EResult result)
Parameters
resultEResultThe Steam result.
Returns
- string
Human-readable result string.
GetLocalPlayerName()
Gets the local Steam user's display name.
public static string GetLocalPlayerName()
Returns
- string
Display name of the local user.
GetPlayerName(CSteamID)
Gets the display name for a specific Steam user.
public static string GetPlayerName(CSteamID steamId)
Parameters
steamIdCSteamIDSteam ID of the user.
Returns
- string
Display name of the user.
IsFriend(CSteamID)
Checks if a specific user is a friend of the local player.
public static bool IsFriend(CSteamID steamId)
Parameters
steamIdCSteamIDSteam ID to check.
Returns
- bool
True if the user is a friend.
IsSteamInitialized()
Checks if Steam is initialized and ready for networking.
public static bool IsSteamInitialized()
Returns
- bool
True if Steam is initialized.
IsValidSteamID(CSteamID)
Validates that a Steam ID is valid and not nil. Compatible with both real Steam and Goldberg Steam Emu.
public static bool IsValidSteamID(CSteamID steamId)
Parameters
steamIdCSteamIDSteam ID to validate.
Returns
- bool
True if the Steam ID is valid.
ParseSteamID(string)
Converts a string to a Steam ID safely.
public static CSteamID? ParseSteamID(string steamIdString)
Parameters
steamIdStringstringString representation of Steam ID.
Returns
- CSteamID?
Steam ID if valid, null otherwise.