Steam Settings
Configuration and easy access to key artefacts
Like what your seeing?
Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our GitHub Sponsors ... become a sponsor today!
Introduction
SteamSettings is the root of Heathen's Steamworks.
You can edit the existing Steam Settings included with the Demo Scenes or create your own Steam Settings in your Project tab by right clicking and selecting Create > Steamworks > Settings
SteamSettings inherits from ScriptableObject, which means it can be referenced at development time and across all scenes without the overhead a MonoBehavior brings with it. In addition the SteamSettings object includes static references to the active Steamworks Behaviour, Client settings DLC, Stats and Achievements and most other referenced artefacts.
There are three ways to interact with and access the most important parts of SteamSettings at runtime.
SteamSettings.current
This is a static reference to the initialized SteamSettings object. It gets initialized when the Init Method gets called by the Steamworks Behaviour component.
SteamSettings.Client
This is a static reference to the initialized SteamSettings.GameClient. The GameClient member provides easy access to features and systems relevant for your "client", that is the application the end user is actually playing e.g. your game. This would include features such as overlay, friends, clans, stats, achievements, and more.
SteamSettings.Server
This is a static reference to the initialized SteamSettings.GameServer. The GameServer member in contrast deals with the configuration of Steamworks server related features, and only comes into play for server builds.
This and its related functionality is stripped out of the compile on client builds. That is this code will not compile and will not be available for use in normal / client builds.
Definition
Fields and Attributes
Current
A static reference to the currently initialized Steam Settings object.
Behaviour
A static reference to the Steamworks Behaviour that initialized the Steam API and is managing the Steam update loop.
Leaderboards
A static reference to the collection of leaderboard objects being managed by the system.
DLC
A static reference to the collection of downloadable content objects being managed by the system.
Stats
A static reference to the collection of stat objects being managed by the system. This includes both Int and Float based stats.
Achievements
A static reference to the collection of achievement objects being managed by the system.
Application Id
A static reference to the App ID recorded for the active settings object.
Has Initialization Error
A static valid indicating rather or not the API experienced an error on initialization.
Initialization Error Message
If initialization had an error a message will be available in this field indicating what or why.
Initialized
A static value indicating rather or not the Steam API has been initialized.
Client
A static reference to the active client tools and features if available. Note it is possible to have this stripped out of compilation for server builds.
Server
A static reference to the active server tools and features if available. Note it is possible to have this stripped out of compilation for client builds.
Events
evtSteamInitalized
occurs when steam initializes, This event handler does not take any arguments
evtSteamInitalizationError
occurs when steam initialization has an error, This event handler provides a string message indicating the likely problem or response from Steam.
Methods
Initialize
Initializes the Steam API based on the configuration settings defined in the settings object. This will initialize the Steam Game Server APIs for server builds or the Steam API (client api) for client builds.
Create Behaviour
Used to create a SteamworksBehaviour at run time if required. If one is already present this will do nothing.
Static version of CreteatBehaviiour
Last updated