Unity Initialization
1st and foremost ... if you have SteamManager.cs in your project, remove it.
That script should not be used at all; it is not part of Heathen's Toolkit, and it was not meant to be dragged and dropped into a production project in the first place.
Pure Code
You do NOT require any GameObjects to make Steamworks run. You can simply call the generated wrapper.
SteamTools.Game.Initialize();Ready Check
You can check if the interface is ready to use by using the Interface class
private void Start()
{
if (SteamTools.Interface.IsReady)
{
// Ready to go
}
else
{
// Not ready yet, listen for On Ready
SteamTools.Interface.OnReady += Interface_OnReady;
}
}
private void Interface_OnReady()
{
// Ready now
}Or you can use the "When Ready" feature.
private void Start()
{
SteamTools.Interface.WhenReady(Interface_OnReady);
}
private void Interface_OnReady()
{
// Ready Now
}Debugging
To enable debugging from code, you can set:
SteamTools.Interface.IsDebugging = true;This will cause it to be more verbose about things. In general, you would set this before you initialise, so you can get more verbose initialisation steps as well.
Code Free
If you need a code-free solution, we provide you with a component script which will initialise the Steamworks SDK for you based on your configured settings.
There are no settings needed; that is all handled by your configuration. You do not need to mark this object Do Not Destroy, It exists to do nothing more than call
SteamTools.Game.Initialize();Last updated

