Skip to content

Commit 9b9b387

Browse files
authored
fix: don't access Unity AnalyticsSessionInfo.userId on unknown platforms (#971)
1 parent bfa574f commit 9b9b387

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Fixes
6+
7+
- Don't access Unity `AnalyticsSessionInfo.userId` on unknown platforms ([#971](https://github.com/getsentry/sentry-unity/pull/971))
8+
59
### Dependencies
610

711
- Bump Cocoa SDK from v7.24.1 to v7.25.0 ([#967](https://github.com/getsentry/sentry-unity/pull/967))
@@ -14,6 +18,7 @@
1418

1519
- Fixed a crash during startup due in connection to the Google Ads Unity package ([#953](https://github.com/getsentry/sentry-unity/pull/953))
1620
- The SDK failing to reinstall the backend will no longer lead to events being sent to Sentry ([#962](https://github.com/getsentry/sentry-unity/pull/962))
21+
- Don't access Unity `AnalyticsSessionInfo.userId` on unknown platforms ([#971](https://github.com/getsentry/sentry-unity/pull/971))
1722

1823
### Features
1924

src/Sentry.Unity/ScriptableSentryUnityOptions.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using Sentry.Extensibility;
33
using Sentry.Unity.Integrations;
44
using UnityEngine;
5-
using UnityEngine.Analytics;
65

76
namespace Sentry.Unity
87
{
@@ -147,8 +146,6 @@ internal SentryUnityOptions ToSentryUnityOptions(bool isBuilding, ISentryUnityIn
147146
}
148147
else
149148
{
150-
options.DefaultUserId = AnalyticsSessionInfo.userId;
151-
152149
// This is only provided on a best-effort basis for other than the explicitly supported platforms.
153150
if (options.BackgroundWorker is null)
154151
{

0 commit comments

Comments
 (0)