Game ideas & features

Your next feature

Crash Reporting

Capture a test error with context.

Unity
Your visible result

A test error appears with context in the dashboard.

Triage a crash report1:22

Existing dashboard tutorial. It shows the previous design; the guide follows the current workflow.

Open video separately ↗

Build this feature

You can preview the guide. Running it requires an active project key. Prepare project

SDK installed and project configuration imported.

C#
Assets/Scripts/CrashReportingDemo.cs
horizOn callSetup
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4using PM.horizOn.Cloud.Core;
5using PM.horizOn.Cloud.Manager;
6​
7// Attach this script to a GameObject in your first scene.
8public class CrashReportingDemo : MonoBehaviour
9{
10 async void Start()
11 {
12 // Setup: initialize, connect and sign in a player.
13 HorizonApp.Initialize();
14 await new HorizonServer().Connect();
15 await UserManager.Instance.SignUpAnonymous("PlayerName");
16​
17 // horizOn: capture crashes with breadcrumbs and context.
18 // Start capture once, then add context as the player progresses
19 CrashManager.Instance.StartCapture();
20 CrashManager.Instance.SetUserId(UserManager.Instance.CurrentUser.UserId);
21 CrashManager.Instance.RecordBreadcrumb("scene", "Entered dungeon_01");
22​
23 // Report a handled exception with extra diagnostic keys
24 try { LoadInventory(); }
25 catch (Exception ex)
26 {
27 CrashManager.Instance.RecordException(ex, new Dictionary<string, string>
28 {
29 ["scene"] = "dungeon_01"
30 });
31 }
32 }
33​
34 void LoadInventory()
35 {
36 // Your own game code
37 }
38}

Test your new feature.

A test error appears with context in the dashboard.

Choose the same project in the dashboard as in your game configuration.

Endpoints
  • POST/crash-reports/session
  • POST/crash-reports/create
All endpoints in the API reference
Our suggestion for your next step

Give every round a high score.

Save the score after a round and show who's ahead. Keep using your connection and player session.