Set Up User Feedback

Learn more about collecting user feedback when an event occurs. Sentry pairs the feedback with the original event, giving you additional insight into issues.

When a user experiences an error, Sentry provides the ability to collect additional feedback. The Unity SDK provides both a simple prefab-based solution and a programmatic API for collecting user feedback.

The Unity SDK includes a ready-to-use prefab that provides a complete user feedback solution. This prefab contains:

  • A feedback button (megaphone icon) that opens the feedback form
  • A feedback form with fields for:
    • Name (optional)
    • Email (optional)
    • Message/feedback (required)
    • Screenshot (optional, taken automatically)

  1. Drag and drop the User Feedback prefab from the Unity SDK package into any scene
  2. The prefab includes a scaling canvas that works across different screen sizes and resolutions
  3. The prefab is ready to use immediately without any additional configuration

The User Feedback prefab includes a megaphone button that triggers the feedback form:

When clicked, the feedback form appears with fields for user input:

You can customize the feedback form by:

  • Creating a prefab variant to inherit from the original while allowing updates
  • Removing optional fields (name, email) by deleting them from the VerticalLayoutGroup
  • Modifying the appearance and styling of the form elements
  • The prefab comes with a custom inspector that highlights missing or broken references:
    • Missing optional fields are highlighted in yellow
    • Missing required fields are highlighted in red

If you prefer to create your own feedback form or need programmatic control, you can use the SDK's API to send feedback to Sentry:

Copied
var eventId = SentrySdk.CaptureMessage("An event that will receive user feedback.");

SentrySdk.CaptureFeedback("It broke.", "user@example.com", "The User", associatedEventId: eventId);
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").