# Unity Initialization

{% hint style="info" %}
Legacy worked a bit differently for initialisation ... \
See [Legacy Getting Started](https://kb.heathen.group/old-kb/old-toolkit-for-steamworks/unity/legacy/quick-start-guide) for more info.
{% endhint %}

{% hint style="success" %}
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.
{% endhint %}

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h3>Pure Code</h3></td><td><ul><li>Doesn't require a GameObject</li><li>No ScriptableObject</li><li>Pure C#</li></ul></td><td><a href="/files/JfKQbNmHD8VJHpr8HxFV">/files/JfKQbNmHD8VJHpr8HxFV</a></td><td><a href="/pages/V6PG1941IRZIMbDE7Q35#pure-code-1">/pages/V6PG1941IRZIMbDE7Q35#pure-code-1</a></td></tr><tr><td><h3>Code Free</h3></td><td><ul><li>Set your desired settings.</li><li>Add a component to the game object. </li><li>Done!</li></ul></td><td><a href="/files/LR2sukJKeepkmJMXhFZl">/files/LR2sukJKeepkmJMXhFZl</a></td><td><a href="/pages/V6PG1941IRZIMbDE7Q35#component">/pages/V6PG1941IRZIMbDE7Q35#component</a></td></tr></tbody></table>

## Pure Code

You do NOT require any GameObjects to make Steamworks run. You can simply call the [generated wrapper](/steam/configuration/unity-configuration.md#generate-wrapper).

```csharp
SteamTools.Interface.Initialise();
```

### Ready Check

You can check if the interface is ready to use by using the Interface class

```csharp
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.

```csharp
private void Start()
{
    SteamTools.Interface.WhenReady(Interface_OnReady);
}

private void Interface_OnReady()
{
    // Ready Now
}
```

### Debugging

To enable debugging from code, you can set:

```csharp
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.

<figure><img src="/files/GU73MQWn5uKPyHP2LG3X" alt=""><figcaption></figcaption></figure>

There are no settings needed; that is all handled by your [configuration](/steam/configuration/unity-configuration.md). You do not need to mark this object Do Not Destroy, It exists to do nothing more than call

```csharp
SteamTools.Interface.Initialise();
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.heathen.group/steam/initialization/unity-initialization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
