Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
336aff0
Configure Xbox
bitsandfoxes Sep 11, 2025
ea69a0a
Dropped 2020
bitsandfoxes Sep 11, 2025
66a3446
Missed one
bitsandfoxes Sep 11, 2025
7215207
Reassign option configuration
bitsandfoxes Sep 11, 2025
bab9820
Updated CHANGELOG.md
bitsandfoxes Sep 11, 2025
8aa0749
Missed dirty state
bitsandfoxes Sep 11, 2025
0ee105b
Cleanup IUnityInfo
bitsandfoxes Sep 11, 2025
6709849
Drop back to 2021.3.45
bitsandfoxes Sep 11, 2025
a140455
Fixed absolute path for local package
bitsandfoxes Sep 11, 2025
3bd571a
Cleaned up tests
bitsandfoxes Sep 11, 2025
33f224b
Forgot to commit the src too
bitsandfoxes Sep 11, 2025
6a24831
Some project settings for the new project
bitsandfoxes Sep 11, 2025
907f119
Format code
getsentry-bot Sep 11, 2025
5ed1ea9
Missed an absolute path
bitsandfoxes Sep 11, 2025
259e0cd
Merge branch 'feat/drop-2020' of https://github.com/getsentry/sentry-…
bitsandfoxes Sep 11, 2025
032b3b9
merged
bitsandfoxes Sep 11, 2025
49658c5
Added Xbox Native Support flag
bitsandfoxes Sep 11, 2025
f9792a7
Merge conflict
bitsandfoxes Sep 11, 2025
de31eca
Updated CHANGELOG.md
bitsandfoxes Sep 11, 2025
56b2e95
Fixed inconsitent build target handling
bitsandfoxes Sep 11, 2025
4746d6c
Workaround for OS name issue
bitsandfoxes Sep 12, 2025
2f7e9e2
Fixed RuntimePlaform checks
bitsandfoxes Sep 12, 2025
3744cc9
Merge branch 'main' into feat/xbox-native
bitsandfoxes Sep 12, 2025
e737892
Format code
getsentry-bot Sep 12, 2025
ec1898d
Fixed obsolete warnings in tests
bitsandfoxes Sep 12, 2025
9494e10
Merge branch 'feat/xbox-native' of https://github.com/getsentry/sentr…
bitsandfoxes Sep 12, 2025
636249f
Fixed merge messup
bitsandfoxes Sep 12, 2025
5db4818
Merge branch 'main' into feat/xbox-native
bitsandfoxes Sep 15, 2025
856fe43
Resolved merge conflict
bitsandfoxes Sep 18, 2025
29c05ab
Merge branch 'feat/xbox-native' of https://github.com/getsentry/sentr…
bitsandfoxes Sep 18, 2025
9bfeb9e
Fixed the changelog
bitsandfoxes Sep 18, 2025
fac0bd7
Merge branch 'main' into feat/xbox-native
bitsandfoxes Sep 22, 2025
01e0a0f
Update CHANGELOG.md
bitsandfoxes Sep 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@

## Unreleased

### Dependencies
### Features

- Added Xbox Native Support ([#2314](https://github.com/getsentry/sentry-unity/pull/2314))

- Bump Cocoa SDK from v8.55.1 to v8.56.0 ([#2318](https://github.com/getsentry/sentry-unity/pull/2318))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8560)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.55.1...8.56.0)
### Fixes

- Fixed input handling in samples to work with old and new input system ([#2319](https://github.com/getsentry/sentry-unity/pull/2319))

### Dependencies

- Bump Cocoa SDK from v8.55.1 to v8.56.0 ([#2318](https://github.com/getsentry/sentry-unity/pull/2318))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8560)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.55.1...8.56.0)

Copy link

Choose a reason for hiding this comment

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

Bug: Duplicate Changelog Section Found

The CHANGELOG.md contains a duplicate "Dependencies" section. The new section (lines 25-30) repeats the Cocoa SDK bump already present in the earlier section (lines 13-23), with minor formatting differences. This appears to be an accidental duplication.

Fix in Cursor Fix in Web

## 4.0.0-beta.2

### Breaking Changes
Expand Down
2 changes: 2 additions & 0 deletions package-dev/Runtime/SentryInitialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#define SENTRY_NATIVE_ANDROID
#elif UNITY_64 && (UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX)
#define SENTRY_NATIVE
#elif UNITY_GAMECORE
#define SENTRY_NATIVE
#elif UNITY_WEBGL
#define SENTRY_WEBGL
#endif
Expand Down
10 changes: 10 additions & 0 deletions src/Sentry.Unity.Editor/ConfigurationWindow/AdvancedTab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ internal static void Display(ScriptableSentryUnityOptions options, SentryCliOpti
EditorGUI.indentLevel++;
if (UnfoldNativeOptions)
{
GUILayout.Label("Desktop", EditorStyles.boldLabel);

options.WindowsNativeSupportEnabled = EditorGUILayout.Toggle(
new GUIContent("Windows", "Whether to enable native crashes support on Windows."),
options.WindowsNativeSupportEnabled);
Expand All @@ -103,6 +105,8 @@ internal static void Display(ScriptableSentryUnityOptions options, SentryCliOpti
new GUIContent("Linux", "Whether to enable native crashes support on Linux."),
options.LinuxNativeSupportEnabled);

GUILayout.Label("Mobile", EditorStyles.boldLabel);

options.IosNativeSupportEnabled = EditorGUILayout.Toggle(
new GUIContent("iOS", "Whether to enable Native iOS support to capture" +
"errors written in languages such as Objective-C, Swift, C and C++."),
Expand Down Expand Up @@ -133,6 +137,12 @@ internal static void Display(ScriptableSentryUnityOptions options, SentryCliOpti
EditorGUI.EndDisabledGroup();
EditorGUI.EndDisabledGroup();
EditorGUI.indentLevel--;

GUILayout.Label("Console", EditorStyles.boldLabel);

options.XboxNativeSupportEnabled = EditorGUILayout.Toggle(
new GUIContent("Xbox", "Whether to enable native crashes support on Xbox."),
options.XboxNativeSupportEnabled);
}

EditorGUI.indentLevel--;
Expand Down
7 changes: 6 additions & 1 deletion src/Sentry.Unity.Editor/Native/BuildPostProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static class BuildPostProcess
public static void OnPostProcessBuild(BuildTarget target, string executablePath)
{
var targetGroup = BuildPipeline.GetBuildTargetGroup(target);
if (targetGroup is not BuildTargetGroup.Standalone)
if (targetGroup is not BuildTargetGroup.Standalone and not BuildTargetGroup.GameCoreXboxSeries)
{
return;
}
Expand Down Expand Up @@ -77,6 +77,7 @@ public static void OnPostProcessBuild(BuildTarget target, string executablePath)
BuildTarget.StandaloneWindows64 => options.WindowsNativeSupportEnabled,
BuildTarget.StandaloneOSX => options.MacosNativeSupportEnabled,
BuildTarget.StandaloneLinux64 => options.LinuxNativeSupportEnabled,
BuildTarget.GameCoreXboxSeries or BuildTarget.GameCoreXboxOne => options.XboxNativeSupportEnabled,
_ => false,
};

Expand All @@ -94,6 +95,10 @@ private static void AddCrashHandler(IDiagnosticLogger logger, BuildTarget target
case BuildTarget.StandaloneOSX:
// No standalone crash handler for Linux/macOS - uses built-in handlers.
return;
case BuildTarget.GameCoreXboxSeries:
case BuildTarget.GameCoreXboxOne:
// TODO: Figure out if we need to ship with a crash handler

Choose a reason for hiding this comment

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

Can we test this before we ship it? Not sure how useful this is if we don't have a crash handler?

Copy link
Collaborator

Choose a reason for hiding this comment

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

xbox currently uses breakpad so there's no additional executable that needs to be copied. This shall change in https://github.com/getsentry/sentry-xbox/issues/5

return;
default:
throw new ArgumentException($"Unsupported build target: {target}");
}
Expand Down
6 changes: 5 additions & 1 deletion src/Sentry.Unity/Il2CppEventProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ is RuntimePlatform.Android
or RuntimePlatform.LinuxPlayer
or RuntimePlatform.LinuxServer
or RuntimePlatform.WindowsPlayer
or RuntimePlatform.WindowsServer;
or RuntimePlatform.WindowsServer
or RuntimePlatform.GameCoreXboxSeries
or RuntimePlatform.GameCoreXboxOne;
}

private string GetPlatformDebugImageType(RuntimePlatform? platform = null)
Expand All @@ -379,6 +381,8 @@ private string GetPlatformDebugImageType(RuntimePlatform? platform = null)
return "macho";
case RuntimePlatform.WindowsPlayer:
case RuntimePlatform.WindowsServer:
case RuntimePlatform.GameCoreXboxSeries:
case RuntimePlatform.GameCoreXboxOne:
return "pe";
default:
return "unknown";
Expand Down
14 changes: 12 additions & 2 deletions src/Sentry.Unity/Integrations/UnityScopeIntegration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Sentry.Reflection;
using Sentry.Integrations;
using Sentry.Unity.Integrations;
using UnityEngine;
using OperatingSystem = Sentry.Protocol.OperatingSystem;

namespace Sentry.Unity;
Expand Down Expand Up @@ -78,9 +79,18 @@ private void PopulateApp(App app)
app.BuildType = isDebugBuild is null ? null : (isDebugBuild.Value ? "debug" : "release");
}

private void PopulateOperatingSystem(OperatingSystem operatingSystem)
private void PopulateOperatingSystem(OperatingSystem operatingSystemContext)
{
operatingSystem.RawDescription = MainThreadData.OperatingSystem;
if (ApplicationAdapter.Instance.Platform
is RuntimePlatform.GameCoreXboxSeries
or RuntimePlatform.GameCoreXboxOne)
{
operatingSystemContext.Name = "Xbox";
}
else
{
operatingSystemContext.RawDescription = MainThreadData.OperatingSystem;
}
Copy link

Choose a reason for hiding this comment

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

Bug: Inconsistent OS Context Population

The PopulateOperatingSystem method now populates operating system context inconsistently. Xbox platforms only set the Name field, while other platforms only set RawDescription. This means Sentry events will have incomplete OS information, missing either the structured name or the detailed raw description.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. This needs to be followed up by fetching the OS from sentry-native.

}

private void PopulateDevice(Device device)
Expand Down
3 changes: 2 additions & 1 deletion src/Sentry.Unity/ScriptableSentryUnityOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static string GetConfigPath(string? notDefaultConfigName = null)
[field: SerializeField] public bool WindowsNativeSupportEnabled { get; set; } = true;
[field: SerializeField] public bool MacosNativeSupportEnabled { get; set; } = true;
[field: SerializeField] public bool LinuxNativeSupportEnabled { get; set; } = true;

[field: SerializeField] public bool XboxNativeSupportEnabled { get; set; } = true;
[field: SerializeField] public bool Il2CppLineNumberSupportEnabled { get; set; } = true;

[field: SerializeField] public SentryRuntimeOptionsConfiguration? RuntimeOptionsConfiguration { get; set; }
Expand Down Expand Up @@ -185,6 +185,7 @@ internal SentryUnityOptions ToSentryUnityOptions(
WindowsNativeSupportEnabled = WindowsNativeSupportEnabled,
MacosNativeSupportEnabled = MacosNativeSupportEnabled,
LinuxNativeSupportEnabled = LinuxNativeSupportEnabled,
XboxNativeSupportEnabled = XboxNativeSupportEnabled,
Il2CppLineNumberSupportEnabled = Il2CppLineNumberSupportEnabled,
PerformanceAutoInstrumentationEnabled = AutoAwakeTraces,
};
Expand Down
17 changes: 12 additions & 5 deletions src/Sentry.Unity/SentryUnityOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ public sealed class SentryUnityOptions : SentryOptions
/// </summary>
public bool LinuxNativeSupportEnabled { get; set; } = true;

/// <summary>
/// Whether the SDK should add native support for Xbox
/// </summary>
public bool XboxNativeSupportEnabled { get; set; } = true;

/// <summary>
/// Whether the SDK should add IL2CPP line number support
/// </summary>
Expand Down Expand Up @@ -393,16 +398,18 @@ internal static bool IsKnownPlatform(RuntimePlatform? platform = null)
return platform
is RuntimePlatform.Android
or RuntimePlatform.IPhonePlayer
or RuntimePlatform.WindowsEditor
or RuntimePlatform.WindowsPlayer
or RuntimePlatform.OSXEditor
or RuntimePlatform.OSXPlayer
or RuntimePlatform.OSXServer
or RuntimePlatform.WindowsEditor
or RuntimePlatform.WindowsPlayer
or RuntimePlatform.WindowsServer
or RuntimePlatform.LinuxEditor
or RuntimePlatform.LinuxPlayer
or RuntimePlatform.LinuxServer
or RuntimePlatform.WebGLPlayer
or RuntimePlatform.WindowsServer
or RuntimePlatform.OSXServer
or RuntimePlatform.LinuxServer;
or RuntimePlatform.GameCoreXboxSeries
or RuntimePlatform.GameCoreXboxOne;
}

public override string ToString()
Expand Down
1 change: 1 addition & 0 deletions src/Sentry.Unity/SentryUnityOptionsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ internal static bool IsNativeSupportEnabled(this SentryUnityOptions options, Run
RuntimePlatform.WindowsPlayer or RuntimePlatform.WindowsServer => options.WindowsNativeSupportEnabled,
RuntimePlatform.OSXPlayer or RuntimePlatform.OSXServer => options.MacosNativeSupportEnabled,
RuntimePlatform.LinuxPlayer or RuntimePlatform.LinuxServer => options.LinuxNativeSupportEnabled,
RuntimePlatform.GameCoreXboxSeries or RuntimePlatform.GameCoreXboxOne => options.XboxNativeSupportEnabled,
_ => false
};
}
Expand Down