BugSplat Documents

Unitybeta unity_crashreporting_bugsplat_small

Please make sure you have completed the following checklist:

  1. Register as a new BugSplat User.
  2. Log in using your email address.
  3. Download the BugSplat Unity package.

The BugSplat Unity package handles all installation or update of the needed files. Double click on this file to launch Unity, create or select a project, and the BugSplat tool will be imported. After unpacking, the tool will be ready to be used. (Note: At least for now, Mac users have to manually import the package contents.)

Exploring the BugSplat Sample

To get a feel of the BugSplat service before using it in your application, try out the debug scene embedded as a sample in the BugSplat Report Tool.

Double-click the debug scene icon found in the projects tab.

 
Unity1
 

Hit the Play button and you will see our example running as shown below. The scene consists of three test buttons and an animated cube.

The Prompted Exception button will send an interactive crash report. A pop-up dialog will ask the user to provide some information and confirm that the crash report should be sent to BugSplat.

The Custom Exception button will create a report using a custom Exception (i.e., created using throw new Exception(“msg”).

The Null Reference Exception button will force a Null Reference Exception (i.e., a common runtime exception in Unity).

 
Unity2
 

By default, crashes are posted to the BugSplat database ‘Fred’. Login at the BugSplat website with username Fred and password Flintstone to view these crash reports.

If you would like to post crashes to your own database, select the app GameObject and it will show the Reporter variable Inspector. Provide your own values for Database, App, Version and the optional Key parameters.

 
Unity3
 

Integrating Into Your Game

Follow the steps below to create a Reporter instance that will handle the detection of Errors and also allow users to send their own reports to the BugSplat server.

  1. Create an empty script or use one already created.
  2. Create a Reporter variable. Don’t forget to add using BugSplat; directive.
  3.  
    Unity4
     

  4. On the Start or Awake method call reporter.Initialize(gameObject) so it will start watching for Exceptions.
  5. Add your script to a GameObject and check that the reporter Inspector is available.
  6.  
    Unity5
     

  7. Configure and fill the fields with data of your BugSplat account:
  8.  

    Field Description
    Database Target database where reports will be sent
    App App name string
    Version Version string of the app
    Quiet Flag that allows ReportComponent to emit debug logs so the user can confirm things are working
    Previous Last sent report
    Generate Screenshots Flag that allows the capture of screenshots before a Report is generated
    Generate Log File Flag that allows the creation of a text file with all logs before the Report
    Prompt Flag that allows the use of a dialog before sending a Report
    Ignored Number of ignored repeated reports
    Logs List of detected Unity logs
    Ignored Number of ignored repeated reports
    Count Number of Reports sent

Exporting

Standalone

  1. File > Build Settings..
  2. Add Open Scenes
  3. Use the following settings to get function names and line numbers
  4.  
    Unity6
     

  5. Click Build
  6. Select a folder for the Windows Store Visual Studio project to be saved in
  7. Open the newly created project in Visual Studio
  8. Add the Internet (Client) permission to the Package.appxmanifest file
  9.  
    Unity7
     

  10. Run your app with Visual Studio and click continue when it catches an exception