Skip to content

feat: improve Xbox native support#2617

Merged
bitsandfoxes merged 7 commits intomainfrom
feat/xbox-native-support
Apr 2, 2026
Merged

feat: improve Xbox native support#2617
bitsandfoxes merged 7 commits intomainfrom
feat/xbox-native-support

Conversation

@bitsandfoxes
Copy link
Copy Markdown
Contributor

This PR introduces a separate Sentry.Unity.Native.Xbox assembly. This allows us to add a 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). This is because Application.persistentDataPath returns empty on packaged and installed Xbox games
  • SentryNativeBridge: treat Xbox GameCore platforms as Windows for path handling
  • SentryUnityOptions: skip persistentDataPath assignment for Xbox platforms

Depends on https://github.com/getsentry/sentry-xbox/pull/117

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.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • Improve Xbox native support by bitsandfoxes in #2617

Internal Changes 🔧

Deps

  • Update .NET SDK to v6.3.0 by github-actions in #2615
  • Update Native SDK to v0.13.4 by github-actions in #2612
  • Update CLI to v3.3.5 by github-actions in #2614
  • Update CLI to v3.3.4 by github-actions in #2604
  • Update Java SDK to v8.37.1 by github-actions in #2605
  • Update Cocoa SDK to v9.8.0 by github-actions in #2596
  • Update Native SDK to v0.13.3 by github-actions in #2597
  • Update Java SDK to v8.36.0 by github-actions in #2591

Other

  • Update validate-pr workflow by stephanie-anderson in #2618
  • Add PR validation workflow by stephanie-anderson in #2608
  • Pin GitHub Actions to full-length commit SHAs by joshuarli in #2601

Other

  • Fix command injection vulnerability in iOS workflow by fix-it-felix-sentry in #2598

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against c294071

/>
</Target>

<!-- Build Xbox version after the Switch build -->
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern has already been established above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This excludes the assembly from being included in Xbox builds.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This includes this assembly for Xbox builds.

Comment on lines +35 to +36
is RuntimePlatform.WindowsPlayer or RuntimePlatform.WindowsServer
or RuntimePlatform.GameCoreXboxSeries or RuntimePlatform.GameCoreXboxOne;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@bitsandfoxes bitsandfoxes marked this pull request as ready for review April 2, 2026 09:42
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@bitsandfoxes bitsandfoxes merged commit fd29f6c into main Apr 2, 2026
40 of 75 checks passed
@bitsandfoxes bitsandfoxes deleted the feat/xbox-native-support branch April 2, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants