Set Up Bugsly for Unity

Crash and error reporting for Unity games across all platforms — iOS, Android, Windows, Mac, WebGL, and consoles with native crash support and automatic breadcrumbs.

1. Install the SDK

// Unity Package Manager → Add package by name: io.sentry.unity

2. 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. You should see the error appear within seconds, complete with stack trace, breadcrumbs, and AI-powered analysis.

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

Get AI-powered error analysis, session replay, and performance monitoring — included free on every plan.

Start Free