Installation & Login
Add the Mistscale package to Unity, authenticate with your API key, and browse your NPCs in the editor.
Setup is three steps: install the package, create a config asset, and log the editor in with your project's API key. Once logged in you can see every NPC in your project, with copyable IDs, directly inside Unity.
1. Install the package
The SDK ships as a Unity package named com.mistscale.unity-sdk, distributed as a folder in the mistscale-sdk repository on GitHub — it is not published to any package registry. It brings its own WebSocket transport; no other dependencies are required.
- 1
Clone the repository, or download a ZIP from the Code button (or a tagged build from Releases).
- 2
Copy the unity/Packages/com.mistscale.game-sdk folder into your Unity project's Packages/ directory.
- 3
Reopen Unity. The package appears under Packages → Mistscale Game SDK.
Copying the folder gives you a local snapshot you update by hand. If you would rather Package Manager track the repo directly, use Add package from git URL instead:
https://github.com/MistScale-AI/mistscale-sdk.git?path=unity/Packages/com.mistscale.game-sdkmanifest.json will not resolve it. Use one of the two methods above.2. Create the config asset
The SDK reads its configuration from a single ScriptableObject. Create it via Assets → Create → Mistscale → Config and place it in a Resources/ folder so it loads automatically at runtime.
ApiKeyControlPlaneUrlNpcEndpointUrlEnableLogging3. Log in from the editor
- 1
Open the login window from the menu bar: Mistscale → Login.
- 2
Click Get API Key. Your browser opens the dashboard's API Keys page for the active project (Project Settings → API Keys).
- 3
Generate a key, copy it, paste it into the window, and click Verify.
- 4
On success the window switches to a project view that lists your NPCs. Copy any NPC ID from here; you will need one for the next guide.
Authenticating at runtime instead
If you would rather not ship a config asset, initialize the SDK in code before any NPC connects:
using Mistscale.SDK;
using UnityEngine;
public class Bootstrap : MonoBehaviour
{
void Awake()
{
MistscaleSDK.InitializeWithKey("ms_your_key_here");
}
}Everything else behaves identically. The SDK is a self-managing singleton: the first component that needs it will create it, and it survives scene loads.