Overview

BugSplat's com.bugsplat.unity package provides crash and exception reporting for Unity projects. BugSplat provides you with invaluable insight into the issues tripping up your users. Our Unity integration collects screenshots, log files, exceptions, and Windows minidumps so that you can fix bugs and deliver a better user experience.

Prerequisites

Additionally, you can check out our my-unity-crasher sample that demonstrates how to use com.bugsplat.unity.

Installation

BugSplat's com.bugsplat.unity package can be added to your project via OpenUPM or a URL to our git repository.

OpenUPM

Information on how to install the OpenUPM package for node.js can be found here.

Git

Information on adding a Unity package via a git URL can be found here.

Usage

BugSplat's Unity integration is flexible and can be used in a variety of ways. The easiest way to get started is to create new script and attach it to a GameObject. In your script, add a using statement that aliases BugSplatUnity.BugSplat as BugSplat.

Next, create a new instance of BugSplat passing it your database, application, and version. Use Application.productName, and Application.version for application and version respectively.

You can set the defaults for a variety of properties on the BugSplat instance. These default values will be used in exception and crash posts. Additionally, you can tell BugSplat to capture a screenshot, include the Player.log file, and include the Editor.log file when an exception is recorded.

You can send exceptions to BugSplat in a try/catch block by calling Post.

The default values specified on the instance of BugSplat can be overridden in the call to Post. Additionally, you can provide a callback to Post that will be invoked with the result once the upload is complete.

You can also configure a global LogMessageRecieved callback. When the BugSplat instance recieves a logging event where the type is Exception it will upload the exception.

BugSplat can be configured to upload Windows minidumps created by the UnityCrashHandler. If your game contains Native Windows C++ plugins, .exe, .dll and .pdb files in the Assets/Plugins/x86 and Assets/Plugins/x86_64 folders they will be uploaded by BugSplat's PostBuild script and used in symbolication.

Each of the methods that post crashes to BugSplat also accept a MinidumpPostOptions parameter and a callback. The usage of MinidumpPostOptions and callback are nearly identically to the ExceptionPostOptions example listed above.

Once you've posted an exception or a minidump to BugSplat click the link in the ID column on either the Dashboard or Crashes pages to see details about your crash.

Unity crash reports

Contributing

BugSplat ❤️s open source! If you feel that this integration can be improved, please open an Issue. If you have an awesome new feature you'd like to implement, we'd love to merge your Pull Request. You can also reach out to us via an email to support@bugsplat.com or the in-app chat on bugsplat.com.