Skip to content

Commit c586fc6

Browse files
committed
xbox native client: add support for XBox One
Use UNITY_GAMECORE_XBOXONE in conditional code throughout backtrace-unity when building against the XBox One platform. Note that the same underlying binary used by the integration, backtrace_native_xbox.dll, can be used on either the XBox One or XBox Series X/S platform. There is no need to distribute a separate DLL. Internal ref BT-5310
1 parent 740010b commit c586fc6

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

Editor/BacktraceConfigurationEditor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public override void OnInspectorGUI()
137137
#endif
138138

139139

140-
#if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE_WIN || UNITY_GAMECORE_XBOXSERIES || UNITY_STANDALONE_OSX
140+
#if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE_WIN || UNITY_GAMECORE_XBOXSERIES || UNITY_GAMECORE_XBOXONE || UNITY_STANDALONE_OSX
141141
SerializedProperty captureNativeCrashes = serializedObject.FindProperty("CaptureNativeCrashes");
142142
EditorGUILayout.PropertyField(
143143
captureNativeCrashes,
@@ -148,7 +148,7 @@ public override void OnInspectorGUI()
148148
EditorGUILayout.HelpBox("You're using Backtrace-Unity integration with Unity 16b NDK support. Please contact Backtrace support for any additional help", MessageType.Warning);
149149
}
150150
#endif
151-
#if !UNITY_GAMECORE_XBOXSERIES
151+
#if !UNITY_GAMECORE_XBOXSERIES && !UNITY_GAMECORE_XBOXONE
152152
EditorGUILayout.PropertyField(
153153
serializedObject.FindProperty("HandleANR"),
154154
new GUIContent(BacktraceConfigurationLabels.LABEL_HANDLE_ANR));

Runtime/Model/BacktraceConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public class BacktraceConfiguration : ScriptableObject
130130
/// Capture native NDK Crashes.
131131
/// </summary>
132132
[Tooltip("Capture native NDK Crashes (ANDROID API 21+)")]
133-
#elif UNITY_IOS || UNITY_STANDALONE_WIN || UNITY_GAMECORE_XBOXSERIES || UNITY_STANDALONE_OSX
133+
#elif UNITY_IOS || UNITY_STANDALONE_WIN || UNITY_GAMECORE_XBOXSERIES || UNITY_GAMECORE_XBOXONE || UNITY_STANDALONE_OSX
134134
/// <summary>
135135
/// Capture native crashes.
136136
/// </summary>

Runtime/Native/Base/NativeClientBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE_WIN || UNITY_GAMECORE_XBOXSERIES || UNITY_STANDALONE_OSX
1+
#if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE_WIN || UNITY_GAMECORE_XBOXSERIES || UNITY_GAMECORE_XBOXONE || UNITY_STANDALONE_OSX
22
using Backtrace.Unity.Model;
33
using Backtrace.Unity.Model.Breadcrumbs;
44
using Backtrace.Unity.Extensions;

Runtime/Native/NativeClientFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ internal static INativeClient CreateNativeClient(BacktraceConfiguration configur
1414
{
1515
#if UNITY_EDITOR
1616
return null;
17-
#elif UNITY_GAMECORE_XBOXSERIES
17+
#elif UNITY_GAMECORE_XBOXSERIES || UNITY_GAMECORE_XBOXONE
1818
return new XBOX.NativeClient(configuration, breadcrumbs, attributes, attachments);
1919
#elif UNITY_STANDALONE_WIN
2020
return new Windows.NativeClient(configuration, breadcrumbs, attributes, attachments);

Runtime/Native/XBOX/NativeClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if UNITY_GAMECORE_XBOXSERIES
1+
#if UNITY_GAMECORE_XBOXSERIES || UNITY_GAMECORE_XBOXONE
22
using Backtrace.Unity.Interfaces;
33
using Backtrace.Unity.Model;
44
using Backtrace.Unity.Model.Breadcrumbs;
@@ -41,7 +41,7 @@ private static extern bool BacktraceNativeXboxInit(
4141
/// Determine if the XBOX integration should be enabled
4242
/// </summary>
4343
private bool _enabled =
44-
#if UNITY_GAMECORE_XBOXSERIES && !UNITY_EDITOR
44+
#if !UNITY_EDITOR
4545
true;
4646
#else
4747
false;

0 commit comments

Comments
 (0)