Unity Lite is a pure C# 6 SDK compiled with Unity and supported by all Unity platforms.
On this page, we get you up and running with Sentry's SDK, so that it will automatically report errors and exceptions in your application.
This is a stable but lightweight SDK that doesn't support all of Sentry's features. It's in the process of being replaced by Unity SDK.
Sentry captures data by using an SDK within your application’s runtime.
Get the SDK via the Unity Package Manager using a Git URL to Sentry's SDK repository:
Configuration should happen as early as possible in your application's lifecycle.
You can attach Sentry to a Game Object and initialize it with the DSN programatically:
var sentry = gameObject.AddComponent<SentrySdk>(); sentry.Dsn = "https://examplePublicKey@o0.ingest.sentry.io/0";
This snippet includes an intentional error, so you can test that everything is working as soon as you set it up:
Once the SDK is configured with the DSN, you can call from anywhere:
Learn more about manually capturing an error or message, in our Usage documentation.
To view and resolve the recorded error, log into sentry.io and open your project. Clicking on the error's title will open a page where you can see detailed information and mark it as resolved.