Set Up Bugsly for Unity
Crash and error reporting for Unity games across iOS, Android, Windows, Mac, WebGL, and consoles — native crash support and automatic breadcrumbs.
1. Install the SDK
// Unity Package Manager → Add package from git URL:
https://github.com/getsentry/unity.git2. Configure Bugsly
Add the following to your application entry point. Replace the DSN with your project DSN from the Bugsly dashboard.
// Option 1: Configure via Unity Editor
// Tools → Sentry → Configuration
// Set DSN to: https://your-dsn@bugsly.dev/1
// Option 2: Configure via script
using Sentry.Unity;
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
static void InitSentry()
{
SentryUnity.Init(options =>
{
options.Dsn = "https://your-dsn@bugsly.dev/1";
options.TracesSampleRate = 1.0;
options.AttachStacktrace = true;
options.Il2CppLineNumberSupportEnabled = true;
});
}3. Verify It Works
Trigger a test error in your application and check your Bugsly dashboard. The error should show up as an issue within a few seconds.
Want to check your DSN before touching any code? From a macOS, Linux or WSL terminal, this sends one real error without any SDK (replace your-dsn with the key from your DSN):
curl -sS -X POST "https://bugsly.dev/api/1/envelope/" \
-H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=your-dsn" \
--data-binary $'{}\n{"type":"event"}\n{"level":"error","platform":"other","exception":{"values":[{"type":"CurlTestError","value":"Hello from my terminal"}]}}'What You Get with Unity
- Native crash reporting for iOS, Android, Windows, and Mac
- IL2CPP line number support for readable production stack traces
- Automatic scene and GameObject breadcrumbs
- Works with all Unity platforms including WebGL and consoles
- AI-powered analysis explains Unity-specific errors in plain English
- Captures device info, GPU, OS version, and memory state
Frequently Asked Questions
Does Bugsly work with IL2CPP builds?
Yes. Enable Il2CppLineNumberSupportEnabled in the Sentry options to get accurate line numbers in IL2CPP builds. The SDK automatically handles symbol upload for native crash reporting.
Can I track errors from both client and game server?
Yes. Use the Unity SDK (io.sentry.unity) for the client and the .NET SDK (Sentry NuGet package) for the game server. Use separate Bugsly projects to keep them organized, or use tags to filter.
How do I add game context to error reports?
Use SentrySdk.ConfigureScope to add player ID, level, game state, and other custom context. This appears alongside the error in Bugsly's dashboard for faster debugging.
Start tracking errors in Unity for free
The free plan includes 100 issues per month, 7-day retention and 10 AI requests per month. Paid plans start at $19/mo.
Start Free