Steamworks module
This is the Steamworks integration base module that the Steam login Add-on and the Steam payment Add-on share. It brings in Steamworks.NET, an external package that wraps the Steamworks SDK so that it can be called from C#, as a dependency, and serves as the single entry point for Steamworks integration. It provides the app with an interface that checks whether the Steamworks SDK is ready to use.
If you install either of the two Add-ons, this module is installed with it. During installation, you must also register a registry entry from which Steamworks.NET is downloaded. For how to do this, see Additional registry required when you use Steam Add-ons.
Module information
- Package:
com.com2usplatform.hiveaxyl.steamworks - Namespace:
Hive.Axyl.Steamworks - Supported platforms: Windows, macOS
- Minimum requirements: Unity 6000.0+
- Dependency package:
com.rlabrecque.steamworks.net20.2.0
Provided interfaces
| Interface | Retrieval method | Description |
|---|---|---|
| ISteamworksContext | SteamworksContext.CreateDefault() | Checking whether the Steamworks SDK is supported and initialized |
Relationship with other modules
The Steam login Add-on and the Steam payment Add-on call the Steamworks SDK through the Steamworks.NET bindings that this module brings in, and before they call it, they use this module to check whether the Steamworks SDK is ready to use. Both Add-ons use this module internally by themselves, so the app does not need to handle this module separately to use the Add-ons.
Use ISteamworksContext only when the app needs to check the state of the Steamworks SDK itself. For example, use it to decide whether to display the Steam login button.
Retrieval
You do not register this module in HiveBootstrap.Initialize. Create it yourself with SteamworksContext.CreateDefault(). You can keep using the created object as is until the app exits.
Steamworks SDK initialization
This module does not initialize the Steamworks SDK. The app is responsible for calling SteamAPI.Init(), calling SteamAPI.RunCallbacks() every frame, and calling SteamAPI.Shutdown() on exit. For how to initialize it, see Initialize Steamworks.