Skip to content

Commit a1a237e

Browse files
authored
Ureal Engine: Update user feedback examples (#14683)
This PR updates code examples (both C++ and blueprint) showing how to use the new user feedback API. Related to: - getsentry/sentry-unreal#1051
1 parent 9448248 commit a1a237e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

platform-includes/user-feedback/sdk-api-example/unreal.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
```cpp
22
USentrySubsystem* SentrySubsystem = GEngine->GetEngineSubsystem<USentrySubsystem>();
33

4-
USentryId* EventId = SentrySubsystem->CaptureMessage(TEXT("Message with feedback"));
4+
FString EventId = SentrySubsystem->CaptureMessage("Message with feedback");
55

6-
USentryUserFeedback* UserFeedback = NewObject<USentryUserFeedback>();
7-
User->Initialize(EventId);
8-
User->SetEmail("[email protected]");
9-
User->SetName("Name");
10-
User->SetComment("Some comment");
6+
USentryFeedback* UserFeedback = NewObject<USentryFeedback>();
7+
UserFeedback->Initialize("Feedback message");
8+
UserFeedback->SetName("Jon Doe");
9+
UserFeedback->SetContactEmail("[email protected]");
10+
UserFeedback->SetAssociatedEvent(EventId);
1111

12-
SentrySubsystem->CaptureUserFeedback(UserFeedback);
12+
SentrySubsystem->CaptureFeedback(UserFeedback);
1313

1414
// OR
1515

16-
SentrySubsystem->CaptureUserFeedbackWithParams(EventId, "[email protected]", "Some comment", "Name");
16+
SentrySubsystem->CaptureFeedbackWithParams("Feedback message", "Jon Doe", "[email protected]", EventId);
1717
```
1818
1919
The same result can be achieved by calling corresponding functions in blueprint:
608 KB
Loading

0 commit comments

Comments
 (0)