Integration Guides

Game Engine Integration

BetaHub comes with in-engine integration plugins that allow to collect bugs directly from a running game. The integration provides:

  • Bug report form can appear on event (e.g. key press), user interaction (e.g. button click), or event (e.g. crash).
  • Attached video recording of recent gameplay (duration is configurable)
  • Attached logs and screenshots
  • Fully customizable bug report form

Unity Plugin Integration

Installing BetaHub Unity Plugin
Installing BetaHub Unity Plugin

Learn how to install the BetaHub Unity Plugin in your Unity project to enable bug reporting and feedback collection.

Watch Screencast

You can find our Unity plugin on GitHub. It’s a Unity package that you can import into your project. The plugin is compatible with Unity 2021.1 and later versions.

Installation

  1. In the Unity editor, open your project.
  2. Go to the Window menu and select Package Manager.
  3. Click the + button in the top-left corner and select Add package from git URL.
  4. Enter the following URL: https://github.com/betahub-io/unity-plugin.git
  5. Click Add to import the package.

It’s recommended to import sample scene to see how the plugin works. To do so, unfold the Samples list in the Package Manager and click Import.

FFmpeg installation

The plugin uses FFmpeg to record videos. You need to install it inside your project to enable video recording. To do so, click on the Tools / BetaHub/ Install FFmpeg menu item in the Unity editor. This will download and install FFmpeg in your project.

The plugin currently supports Windows, macOS and Linux. If you are using a different platform, you may need to install FFmpeg manually and do the necessary changes in the plugin code.

Quick Start

  1. In Packages/BetaHub Bug Reporter/Runtime/Prefabs folder, you will find the BugReportingFormCanvas prefab. Drag it to your scene.
  2. Click on newly created BugReportingFormCanvas object in the hierarchy.
  3. In the inspector, find the Project ID field and enter your project ID.

You can find your project ID in the project settings on the BetaHub website. You can also copy it from the URL when you are on the project page, it’s the last part of the URL that starts with pr-.

And you’re done! You can now run your game and press F12 to open the bug report form.

Configuration

In the BugReportingFormCanvas inspector, you can find settings that you can adjust to your needs:

  • Shortcut Key - (Default: F12) The key that opens the bug report form. You can disable it by setting it to None. Disabling it makes sense if you want to open the form programmatically.
  • BH_Performance_Sampler
    • Sample Frequency - How often the plugin samples the game performance.
    • Sample Duration - How long the plugin samples the game performance.
  • BH_Game_Recorder
    • Frame Rate - (Default: 30) The frame rate of the recorded video. Note that higher frame rates may result in larger video files and higher CPU/GPU usage during recording.
    • Recording Duration - (Default: 60) The maximum duration of the recorded video.

Opening the Bug Report Form Programmatically

In most cases, you will want to open the bug report form on a specific event, like a menu button click. It’s easy to do so, because all you need to do is to call the SetActive method on the BH_BugReportUI object. But be aware of what may be included by default:

What Included Property to Control
Video Yes IncludeVideo
Player.log Yes IncludePlayerLog
Screenshots No None

Including Screenshots

You can include one or more screenshot files to the bug report. To do so, you need to call the AddScreenshot method on the BH_BugReportUI object:

Remember to call these functions everytime you want to include screenshots and log files. The plugin doesn’t store them between bug reports.

public void AddScreenshot(string path, bool removeAfterUpload)

  • path - The path to the screenshot file.
  • removeAfterUpload - If true, the screenshot file will be removed after it’s uploaded to the server.

Try making a screenshot before the user opens any menu that leads to the bug report form. A screenshot of the bug itself is more valuable than a screenshot of the bug report form.

If including multiple screenshots, consider saving them as JPG files to recude the time needed to upload them. The upload is done in background, but if the user decides to close the game before the upload is complete, the screenshots might be not be uploaded.

Including Logs

You can include custom log files to the bug report. To do so, you need to call the AddLog method on the BH_BugReportUI object:

public void AddLog(string path, bool removeAfterUpload)

  • path - The path to the log file.
  • removeAfterUpload - If true, the log file will be removed after it’s uploaded to the server.

Unreal Plugin Integration

Installing BetaHub Unreal Plugin
Installing BetaHub Unreal Plugin

Learn how to install the BetaHub Unreal Plugin in your Unreal project to enable bug reporting and feedback collection.

Watch Screencast

Installation

  1. In the Unreal Editor, open your project.
  2. Go to your project’s root directory and create a new folder named Plugins.
  3. Go to the BetaHub Unreal Plugin GitHub page and download the latest release zip file.
  4. Right-click the downloaded zip file and select Extract All. Follow the instructions to extract the contents of the zip file.
  5. Copy the contents of the extracted folder to the Plugins directory. The structure should look like this: YourProject/Plugins/BetaHubBugReporter/, with all the plugin files inside the BetaHubBugReporter folder.
  6. Restart the Unreal Editor to load the plugin. You will be asked to rebuild the plugin files. Click ‘Yes’ to rebuild the plugin. This may take a few minutes and you won’t see any progress bar.

Make sure to check if the plugin is enabled after the rebuild. To do so, navigate to Edit -> Plugins and search for BetaHub Bug Reporter.

Quick Start

  1. Open your Project Settings.
  2. Scroll down to BetaHub Bug Reporter and enter your Project ID. You can find the Project ID in your project settings on the BetaHub website. For the link, check the description below.

You can find your project ID in the project settings on the BetaHub website. You can also copy it from the URL when you are on the project page, it’s the last part of the URL that starts with pr-.

And you’re done! You can now run your game and press F12 to open the bug report form.

Configuration

In the BetaHub Bug Reporter section of your Project Settings, you can adjust settings to fit your needs:

  • API Endpoint - The endpoint for the BetaHub API. Default: https://app.betahub.io
  • Project ID - Your project’s unique identifier on BetaHub. You can find the Project ID in your project settings on the BetaHub website.
  • Spawn Background Service on Startup - Toggle whether to start the background service automatically when the project starts. If disabled, you’d need to start it programmatically (see below).
  • Enable Shortcut - Toggle whether the shortcut key should be enabled. If disabled, you’d need to open the bug report form programmatically (see below).
  • Shortcut Key - (Default: F12) The key that opens the bug report form.
  • Max Recorded Frames - The maximum number of frames to record.
  • Max Recording Duration - The maximum duration of the recorded video.
  • Report Form Widget Class - The widget class used for the bug report form. Default: BugReportForm
  • Popup Widget Class - The widget class used for the bug report form popup. Default: BugReportFormPopup

Opening the Bug Report Form Programmatically

There are two things you have the control over:

  1. Start/Stop the background service.
  2. Open the bug report form.

Both can be done using Blueprints or C++.

Blueprints

with C++ you have to Create UBH_Manager instance and call one of the following methods:

  • StartService()
  • StopService()
  • SpawnBugReportWidget(bool bTryCaptureMouse = true)

You can find the source code of the plugin on GitHub.