Set up custom reports with Diagnostics

Add custom metadata to issues for enhanced debugging.
Read time 1 minuteLast updated a day ago

By default, issues (including crashes, exceptions, and ANRs) contain standard metadata such as device OS. With Diagnostics, you can also add custom metadata for more debugging capacity. This custom metadata can be captured at any point, such as when the game initializes, a new level loads, or when the player takes a specific action. Issues include a CrashReportHandler class for configuring crash reports and custom metadata. Use the SetUserMetadata method to add up to 64 custom metadata entries to your report. To request a new piece of metadata to track, use the following statement in your Unity project:
UnityEngine.CrashReportHandler.CrashReportHandler.SetUserMetadata("key", "value");