Conversation
Introduce a separate Sentry.Unity.Native.Xbox assembly compiled with SENTRY_NATIVE_XBOX to handle Xbox-specific native SDK integration: - SentryNativeXbox: resolves the Xbox Persistent Local Storage path via sentry_xbox_utils_get_pls_path (from sentry-xbox) since Application.persistentDataPath returns empty on packaged Xbox builds - SentryNativeBridge: treat Xbox GameCore platforms as Windows for path handling - SentryUnityOptions: skip persistentDataPath assignment for Xbox platforms - Build system: add BuildXboxAssembly MSBuild target - Plugin meta: dedicated Xbox assembly enabled only for GameCore targets Depends on sentry-xbox feat/unity-pls branch.
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Internal Changes 🔧Deps
Other
Other
🤖 This preview updates automatically when you update the PR. |
|
| /> | ||
| </Target> | ||
|
|
||
| <!-- Build Xbox version after the Switch build --> |
There was a problem hiding this comment.
The pattern has already been established above.
There was a problem hiding this comment.
This excludes the assembly from being included in Xbox builds.
There was a problem hiding this comment.
This includes this assembly for Xbox builds.
| is RuntimePlatform.WindowsPlayer or RuntimePlatform.WindowsServer | ||
| or RuntimePlatform.GameCoreXboxSeries or RuntimePlatform.GameCoreXboxOne; |
There was a problem hiding this comment.
This is used to determine how the SDK handled and passes paths to sentry-native. For this purpose we can consider the Xbox IsWindows. But admittedly, the whole UseLibC vs IsWindows is technical debt.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

This PR introduces a separate
Sentry.Unity.Native.Xboxassembly. This allows us to add aSENTRY_NATIVE_XBOXto handle Xbox-specific native SDK integration.SentryNativeXbox: resolves the Xbox Persistent Local Storage path viasentry_xbox_utils_get_pls_path()(fromsentry-xbox). This is becauseApplication.persistentDataPathreturnsemptyon packaged and installed Xbox gamesSentryNativeBridge: treat XboxGameCoreplatforms as Windows for path handlingSentryUnityOptions: skippersistentDataPathassignment for Xbox platformsDepends on https://github.com/getsentry/sentry-xbox/pull/117