Facepunch.Steamworks Wiki

Steamworks.SteamClient

Properties

static AppId AppId { get; }
returns the appID of the current process
static bool IsLoggedOn { get; }
Checks if the current user's Steam client is connected to the Steam servers. If it's not then no real-time services provided by the Steamworks API will be enabled. The Steam client will automatically be trying to recreate the connection as often as possible. When the connection is restored a SteamServersConnected_t callback will be posted. You usually don't need to check for this yourself. All of the API calls that rely on this will check internally. Forcefully disabling stuff when the player loses access..
static bool IsValid { get; }
static string Name { get; }
returns the local players name - guaranteed to not be NULL. this is the same name as on the users community profile page
static FriendState State { get; }
gets the status of the current user
static SteamId SteamId { get; }
Gets the Steam ID of the account currently logged into the Steam client. This is commonly called the 'current user', or 'local user'. A Steam ID is a unique identifier for a Steam accounts, Steam groups, Lobbies and Chat rooms, and used to differentiate users in all parts of the Steamworks API.

Methods

static void Init( uint appid, bool asyncCallbacks = True )
Initialize the steam client. If asyncCallbacks is false you need to call RunCallbacks manually every frame.
static bool RestartAppIfNecessary( uint appid )
Checks if your executable was launched through Steam and relaunches it through Steam if it wasn't this returns true then it starts the Steam client if required and launches your game again through it, and you should quit your process as soon as possible. This effectively runs steam://run/AppId so it may not relaunch the exact executable that called it, as it will always relaunch from the version installed in your Steam library folder/ Note that during development, when not launching via Steam, this might..
static void RunCallbacks()
static void Shutdown()