From c3228c67af26b69da7c9b7b9713394dd407d7a25 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Fri, 21 Nov 2025 14:33:27 +0100 Subject: [PATCH 01/17] basic setup --- .../io.sentry.unity.dev.runtime.asmdef | 2 ++ .../Runtime/io.sentry.unity.runtime.asmdef | 2 ++ .../ConfigurationWindow/AdvancedTab.cs | 6 ++++- .../Native/BuildPostProcess.cs | 21 +++++++++++++-- src/Sentry.Unity/Il2CppEventProcessor.cs | 6 ++++- .../Integrations/UnityScopeIntegration.cs | 6 +++++ .../ScriptableSentryUnityOptions.cs | 2 ++ src/Sentry.Unity/SentryUnityOptions.cs | 9 ++++++- .../SentryUnityOptionsExtensions.cs | 1 + .../SentryUnityOptionsExtensionsTests.cs | 26 +++++++++++++++++++ 10 files changed, 76 insertions(+), 5 deletions(-) diff --git a/package-dev/Runtime/io.sentry.unity.dev.runtime.asmdef b/package-dev/Runtime/io.sentry.unity.dev.runtime.asmdef index 3f2957299..c59d5f126 100644 --- a/package-dev/Runtime/io.sentry.unity.dev.runtime.asmdef +++ b/package-dev/Runtime/io.sentry.unity.dev.runtime.asmdef @@ -11,6 +11,8 @@ "LinuxStandalone64", "Lumin", "macOSStandalone", + "PS4", + "PS5", "Stadia", "Switch", "WSA", diff --git a/package/Runtime/io.sentry.unity.runtime.asmdef b/package/Runtime/io.sentry.unity.runtime.asmdef index a1ea874a7..e08af586e 100644 --- a/package/Runtime/io.sentry.unity.runtime.asmdef +++ b/package/Runtime/io.sentry.unity.runtime.asmdef @@ -11,6 +11,8 @@ "LinuxStandalone64", "Lumin", "macOSStandalone", + "PS4", + "PS5", "Stadia", "Switch", "WSA", diff --git a/src/Sentry.Unity.Editor/ConfigurationWindow/AdvancedTab.cs b/src/Sentry.Unity.Editor/ConfigurationWindow/AdvancedTab.cs index 92464500b..081dc3d5c 100644 --- a/src/Sentry.Unity.Editor/ConfigurationWindow/AdvancedTab.cs +++ b/src/Sentry.Unity.Editor/ConfigurationWindow/AdvancedTab.cs @@ -141,8 +141,12 @@ internal static void Display(ScriptableSentryUnityOptions options, SentryCliOpti GUILayout.Label("Console", EditorStyles.boldLabel); options.XboxNativeSupportEnabled = EditorGUILayout.Toggle( - new GUIContent("Xbox", "Whether to enable native crashes support on Xbox."), + new GUIContent("Xbox", "Whether to enable native crash support on Xbox."), options.XboxNativeSupportEnabled); + + options.PlayStationNativeSupportEnabled = EditorGUILayout.Toggle( + new GUIContent("PlayStation", "Whether to enable native crash support on PlayStation."), + options.PlayStationNativeSupportEnabled); } EditorGUI.indentLevel--; diff --git a/src/Sentry.Unity.Editor/Native/BuildPostProcess.cs b/src/Sentry.Unity.Editor/Native/BuildPostProcess.cs index e45108182..a12c98495 100644 --- a/src/Sentry.Unity.Editor/Native/BuildPostProcess.cs +++ b/src/Sentry.Unity.Editor/Native/BuildPostProcess.cs @@ -3,7 +3,6 @@ using Sentry.Extensibility; using Sentry.Unity.Editor.ConfigurationWindow; using System.Text.RegularExpressions; -using Microsoft.Extensions.FileSystemGlobbing; using UnityEngine; using UnityEditor; using UnityEditor.Build; @@ -18,7 +17,10 @@ public static class BuildPostProcess public static void OnPostProcessBuild(BuildTarget target, string executablePath) { var targetGroup = BuildPipeline.GetBuildTargetGroup(target); - if (targetGroup is not BuildTargetGroup.Standalone and not BuildTargetGroup.GameCoreXboxSeries) + if (targetGroup is not BuildTargetGroup.Standalone + and not BuildTargetGroup.GameCoreXboxSeries + and not BuildTargetGroup.PS4 + and not BuildTargetGroup.PS5) { return; } @@ -47,10 +49,12 @@ public static void OnPostProcessBuild(BuildTarget target, string executablePath) // The executable path resolves to the following when pointing Unity into a `build/platform/` directory: // - Desktop: `./samples/unity-of-bugs/builds/windows/unityofbugs.exe` // - Xbox: `./samples/unity-of-bugs/builds/xsx/` + // - PlayStation: `./samples/unity-of-bugs/builds/ps5/` var buildOutputDir = targetGroup switch { BuildTargetGroup.Standalone => Path.GetDirectoryName(executablePath), BuildTargetGroup.GameCoreXboxSeries => executablePath, + BuildTargetGroup.PS4 or BuildTargetGroup.PS5 => executablePath, _ => string.Empty }; @@ -87,6 +91,7 @@ public static void OnPostProcessBuild(BuildTarget target, string executablePath) BuildTarget.StandaloneOSX => options.MacosNativeSupportEnabled, BuildTarget.StandaloneLinux64 => options.LinuxNativeSupportEnabled, BuildTarget.GameCoreXboxSeries or BuildTarget.GameCoreXboxOne => options.XboxNativeSupportEnabled, + BuildTarget.PS4 or BuildTarget.PS5 => options.PlayStationNativeSupportEnabled, _ => false, }; @@ -108,6 +113,10 @@ private static void AddCrashHandler(IDiagnosticLogger logger, BuildTarget target case BuildTarget.GameCoreXboxOne: // No standalone crash handler for Xbox - comes with Breakpad return; + case BuildTarget.PS4: + case BuildTarget.PS5: + // No standalone crash handler for PlayStation + return; default: throw new ArgumentException($"Unsupported build target: {target}"); } @@ -158,6 +167,14 @@ private static void UploadDebugSymbols(IDiagnosticLogger logger, BuildTarget tar paths += $" \"{xboxSentryPluginPath}\""; } break; + case BuildTarget.PS4: + case BuildTarget.PS5: + var playstationSentryPluginPath = Path.GetFullPath("Assets/Plugins/Sentry/"); + if (Directory.Exists(playstationSentryPluginPath)) + { + paths += $" \"{playstationSentryPluginPath}\""; + } + break; case BuildTarget.StandaloneLinux64: var linuxSentryDbg = Path.GetFullPath($"Packages/{SentryPackageInfo.GetName()}/Plugins/Linux/Sentry/libsentry.dbg.so"); if (File.Exists(linuxSentryDbg)) diff --git a/src/Sentry.Unity/Il2CppEventProcessor.cs b/src/Sentry.Unity/Il2CppEventProcessor.cs index e7c4b83d5..dd6b2f4dc 100644 --- a/src/Sentry.Unity/Il2CppEventProcessor.cs +++ b/src/Sentry.Unity/Il2CppEventProcessor.cs @@ -362,7 +362,9 @@ or RuntimePlatform.LinuxServer or RuntimePlatform.WindowsPlayer or RuntimePlatform.WindowsServer or RuntimePlatform.GameCoreXboxSeries - or RuntimePlatform.GameCoreXboxOne; + or RuntimePlatform.GameCoreXboxOne + or RuntimePlatform.PS4 + or RuntimePlatform.PS5; } private string GetPlatformDebugImageType(RuntimePlatform? platform = null) @@ -373,6 +375,8 @@ private string GetPlatformDebugImageType(RuntimePlatform? platform = null) case RuntimePlatform.Android: case RuntimePlatform.LinuxPlayer: case RuntimePlatform.LinuxServer: + case RuntimePlatform.PS4: + case RuntimePlatform.PS5: return "elf"; case RuntimePlatform.IPhonePlayer: case RuntimePlatform.OSXPlayer: diff --git a/src/Sentry.Unity/Integrations/UnityScopeIntegration.cs b/src/Sentry.Unity/Integrations/UnityScopeIntegration.cs index 6f350b242..ca1e0415e 100644 --- a/src/Sentry.Unity/Integrations/UnityScopeIntegration.cs +++ b/src/Sentry.Unity/Integrations/UnityScopeIntegration.cs @@ -83,6 +83,12 @@ is RuntimePlatform.GameCoreXboxSeries { operatingSystemContext.Name = "Xbox"; } + else if (ApplicationAdapter.Instance.Platform + is RuntimePlatform.PS4 + or RuntimePlatform.PS5) + { + operatingSystemContext.Name = "PlayStation"; + } else { operatingSystemContext.RawDescription = MainThreadData.OperatingSystem; diff --git a/src/Sentry.Unity/ScriptableSentryUnityOptions.cs b/src/Sentry.Unity/ScriptableSentryUnityOptions.cs index 07afe57fd..db58ecd9a 100644 --- a/src/Sentry.Unity/ScriptableSentryUnityOptions.cs +++ b/src/Sentry.Unity/ScriptableSentryUnityOptions.cs @@ -111,6 +111,7 @@ public static string GetConfigPath(string? notDefaultConfigName = null) [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 PlayStationNativeSupportEnabled { get; set; } = true; [field: SerializeField] public bool Il2CppLineNumberSupportEnabled { get; set; } = true; [field: SerializeField] public SentryOptionsConfiguration? OptionsConfiguration { get; set; } @@ -191,6 +192,7 @@ internal SentryUnityOptions ToSentryUnityOptions( MacosNativeSupportEnabled = MacosNativeSupportEnabled, LinuxNativeSupportEnabled = LinuxNativeSupportEnabled, XboxNativeSupportEnabled = XboxNativeSupportEnabled, + PlayStationNativeSupportEnabled = PlayStationNativeSupportEnabled, Il2CppLineNumberSupportEnabled = Il2CppLineNumberSupportEnabled, PerformanceAutoInstrumentationEnabled = AutoAwakeTraces, EnableLogs = EnableStructuredLogging, diff --git a/src/Sentry.Unity/SentryUnityOptions.cs b/src/Sentry.Unity/SentryUnityOptions.cs index 899398f11..eaa54dd47 100644 --- a/src/Sentry.Unity/SentryUnityOptions.cs +++ b/src/Sentry.Unity/SentryUnityOptions.cs @@ -232,6 +232,11 @@ public sealed class SentryUnityOptions : SentryOptions /// public bool XboxNativeSupportEnabled { get; set; } = true; + /// + /// Whether the SDK should add native support for PlayStation + /// + public bool PlayStationNativeSupportEnabled { get; set; } = true; + /// /// Whether the SDK should add IL2CPP line number support /// @@ -465,7 +470,9 @@ or RuntimePlatform.LinuxPlayer or RuntimePlatform.LinuxServer or RuntimePlatform.WebGLPlayer or RuntimePlatform.GameCoreXboxSeries - or RuntimePlatform.GameCoreXboxOne; + or RuntimePlatform.GameCoreXboxOne + or RuntimePlatform.PS4 + or RuntimePlatform.PS5; } public override string ToString() diff --git a/src/Sentry.Unity/SentryUnityOptionsExtensions.cs b/src/Sentry.Unity/SentryUnityOptionsExtensions.cs index 666c124cb..b7c0f71bc 100644 --- a/src/Sentry.Unity/SentryUnityOptionsExtensions.cs +++ b/src/Sentry.Unity/SentryUnityOptionsExtensions.cs @@ -59,6 +59,7 @@ internal static bool IsNativeSupportEnabled(this SentryUnityOptions options, Run RuntimePlatform.OSXPlayer or RuntimePlatform.OSXServer => options.MacosNativeSupportEnabled, RuntimePlatform.LinuxPlayer or RuntimePlatform.LinuxServer => options.LinuxNativeSupportEnabled, RuntimePlatform.GameCoreXboxSeries or RuntimePlatform.GameCoreXboxOne => options.XboxNativeSupportEnabled, + RuntimePlatform.PS4 or RuntimePlatform.PS5 => options.PlayStationNativeSupportEnabled, _ => false }; } diff --git a/test/Sentry.Unity.Tests/SentryUnityOptionsExtensionsTests.cs b/test/Sentry.Unity.Tests/SentryUnityOptionsExtensionsTests.cs index 3a896b357..f7a8a622c 100644 --- a/test/Sentry.Unity.Tests/SentryUnityOptionsExtensionsTests.cs +++ b/test/Sentry.Unity.Tests/SentryUnityOptionsExtensionsTests.cs @@ -1,6 +1,7 @@ using System.Linq; using NUnit.Framework; using Sentry.Unity.Tests.Stubs; +using UnityEngine; namespace Sentry.Unity.Tests; @@ -183,4 +184,29 @@ public void DisableUnhandledExceptionCapture_DoesNotRemoveUnityApplicationLoggin Assert.IsTrue(options.Integrations.Any(i => i is Integrations.UnityApplicationLoggingIntegration)); } + + [Test] + [TestCase(RuntimePlatform.PS4, true, true)] + [TestCase(RuntimePlatform.PS4, false, false)] + [TestCase(RuntimePlatform.PS5, true, true)] + [TestCase(RuntimePlatform.PS5, false, false)] + [TestCase(RuntimePlatform.GameCoreXboxSeries, true, true)] + [TestCase(RuntimePlatform.GameCoreXboxSeries, false, false)] + [TestCase(RuntimePlatform.GameCoreXboxOne, true, true)] + [TestCase(RuntimePlatform.GameCoreXboxOne, false, false)] + public void IsNativeSupportEnabled_ConsolePlatforms_ReturnsExpectedValue( + RuntimePlatform platform, bool optionEnabled, bool expectedResult) + { + var options = _fixture.GetSut(); + options.PlayStationNativeSupportEnabled = platform is RuntimePlatform.PS4 or RuntimePlatform.PS5 + ? optionEnabled + : options.PlayStationNativeSupportEnabled; + options.XboxNativeSupportEnabled = platform is RuntimePlatform.GameCoreXboxSeries or RuntimePlatform.GameCoreXboxOne + ? optionEnabled + : options.XboxNativeSupportEnabled; + + var result = options.IsNativeSupportEnabled(platform); + + Assert.AreEqual(expectedResult, result); + } } From 921a9b1b5b9e69668ccc5b5f2801bf3dcb212f72 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Tue, 25 Nov 2025 12:59:57 +0100 Subject: [PATCH 02/17] Initialization --- package-dev/Runtime/SentryInitialization.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package-dev/Runtime/SentryInitialization.cs b/package-dev/Runtime/SentryInitialization.cs index d307d529d..c65ba8602 100644 --- a/package-dev/Runtime/SentryInitialization.cs +++ b/package-dev/Runtime/SentryInitialization.cs @@ -7,6 +7,8 @@ #define SENTRY_NATIVE #elif UNITY_GAMECORE #define SENTRY_NATIVE +#elif UNITY_PS4 || UNITY_PS5 +#define SENTRY_NATIVE #elif UNITY_WEBGL #define SENTRY_WEBGL #endif @@ -131,7 +133,7 @@ private Il2CppMethods _il2CppMethods return null; } -#if UNITY_ANDROID || UNITY_STANDALONE_LINUX +#if UNITY_ANDROID || UNITY_STANDALONE_LINUX || UNITY_PS4 || UNITY_PS5 // For ELF platforms, the 20-byte `NT_GNU_BUILD_ID` needs to be // turned into a "little-endian GUID", which means the first three // components need to be byte-swapped appropriately. From 9a80682890ab69facafae00eaf147275ad52cde6 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Tue, 25 Nov 2025 14:00:05 +0100 Subject: [PATCH 03/17] Disable native logger --- src/Sentry.Unity.Native/SentryNativeBridge.cs | 4 +- src/Sentry.Unity/NativeUtils/CFunctions.cs | 59 +++++++++++-------- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/src/Sentry.Unity.Native/SentryNativeBridge.cs b/src/Sentry.Unity.Native/SentryNativeBridge.cs index 644c52018..bee702567 100644 --- a/src/Sentry.Unity.Native/SentryNativeBridge.cs +++ b/src/Sentry.Unity.Native/SentryNativeBridge.cs @@ -58,7 +58,7 @@ public static bool Init(SentryUnityOptions options) else { options.DiagnosticLogger?.LogDebug("Setting CacheDirectoryPath: {0}", dir); - sentry_options_set_database_path(cOptions, dir); + // sentry_options_set_database_path(cOptions, dir); } if (options.DiagnosticLogger is null) @@ -70,7 +70,7 @@ public static bool Init(SentryUnityOptions options) { options.DiagnosticLogger.LogDebug($"{(_logger is null ? "Setting a" : "Replacing the")} native logger"); _logger = options.DiagnosticLogger; - sentry_options_set_logger(cOptions, new sentry_logger_function_t(nativeLog), IntPtr.Zero); + // sentry_options_set_logger(cOptions, new sentry_logger_function_t(nativeLog), IntPtr.Zero); } options.DiagnosticLogger?.LogDebug("Initializing sentry native"); diff --git a/src/Sentry.Unity/NativeUtils/CFunctions.cs b/src/Sentry.Unity/NativeUtils/CFunctions.cs index 76088e02b..9fe635d84 100644 --- a/src/Sentry.Unity/NativeUtils/CFunctions.cs +++ b/src/Sentry.Unity/NativeUtils/CFunctions.cs @@ -8,6 +8,13 @@ namespace Sentry.Unity.NativeUtils; internal static class C { + // PlayStation and Xbox use static linking, other platforms use dynamic library +#if UNITY_PS4 || UNITY_PS5 || UNITY_GAMECORE + private const string LibraryName = "__Internal"; +#else + private const string LibraryName = "sentry"; +#endif + internal static void SetValueIfNotNull(sentry_value_t obj, string key, string? value) { if (value is not null) @@ -77,78 +84,78 @@ internal static void SetValueIfNotNull(sentry_value_t obj, string key, double? v return null; } - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern sentry_value_t sentry_value_new_object(); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern sentry_value_t sentry_value_new_null(); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern sentry_value_t sentry_value_new_bool(int value); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern sentry_value_t sentry_value_new_double(double value); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern sentry_value_t sentry_value_new_int32(int value); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern sentry_value_t sentry_value_new_string(string value); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern sentry_value_t sentry_value_new_breadcrumb(string? type, string? message); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern int sentry_value_set_by_key(sentry_value_t value, string k, sentry_value_t v); internal static bool IsNull(sentry_value_t value) => sentry_value_is_null(value) != 0; - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern int sentry_value_is_null(sentry_value_t value); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern int sentry_value_as_int32(sentry_value_t value); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern double sentry_value_as_double(sentry_value_t value); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern IntPtr sentry_value_as_string(sentry_value_t value); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern UIntPtr sentry_value_get_length(sentry_value_t value); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern sentry_value_t sentry_value_get_by_index(sentry_value_t value, UIntPtr index); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern sentry_value_t sentry_value_get_by_key(sentry_value_t value, string key); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern void sentry_set_context(string key, sentry_value_t value); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern void sentry_add_breadcrumb(sentry_value_t breadcrumb); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern void sentry_set_tag(string key, string value); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern void sentry_remove_tag(string key); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern void sentry_set_user(sentry_value_t user); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern void sentry_remove_user(); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern void sentry_set_extra(string key, sentry_value_t value); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern void sentry_remove_extra(string key); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern void sentry_set_trace(string traceId, string parentSpanId); internal static readonly Lazy> DebugImages = new(LoadDebugImages); @@ -202,10 +209,10 @@ private static IEnumerable LoadDebugImages() // Returns a new reference to an immutable, frozen list. // The reference must be released with `sentry_value_decref`. - [DllImport("sentry")] + [DllImport(LibraryName)] private static extern sentry_value_t sentry_get_modules_list(); - [DllImport("sentry")] + [DllImport(LibraryName)] internal static extern void sentry_value_decref(sentry_value_t value); // native union sentry_value_u/t From e578294d5463cee4a2e3907621ff4b8d3b5e5e0d Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 26 Nov 2025 11:21:52 +0100 Subject: [PATCH 04/17] Native logger setup --- src/Sentry.Unity.Native/SentryNativeBridge.cs | 34 ++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/src/Sentry.Unity.Native/SentryNativeBridge.cs b/src/Sentry.Unity.Native/SentryNativeBridge.cs index bee702567..21eb8fe1e 100644 --- a/src/Sentry.Unity.Native/SentryNativeBridge.cs +++ b/src/Sentry.Unity.Native/SentryNativeBridge.cs @@ -16,7 +16,9 @@ internal static class SentryNativeBridge { public static bool Init(SentryUnityOptions options) { - _isLinux = Application.platform is RuntimePlatform.LinuxPlayer or RuntimePlatform.LinuxServer; + _useLibC = Application.platform + is RuntimePlatform.LinuxPlayer or RuntimePlatform.LinuxServer + or RuntimePlatform.PS4 or RuntimePlatform.PS5; var cOptions = sentry_options_new(); @@ -58,7 +60,7 @@ public static bool Init(SentryUnityOptions options) else { options.DiagnosticLogger?.LogDebug("Setting CacheDirectoryPath: {0}", dir); - // sentry_options_set_database_path(cOptions, dir); + sentry_options_set_database_path(cOptions, dir); } if (options.DiagnosticLogger is null) @@ -70,7 +72,7 @@ public static bool Init(SentryUnityOptions options) { options.DiagnosticLogger.LogDebug($"{(_logger is null ? "Setting a" : "Replacing the")} native logger"); _logger = options.DiagnosticLogger; - // sentry_options_set_logger(cOptions, new sentry_logger_function_t(nativeLog), IntPtr.Zero); + sentry_options_set_logger(cOptions, new sentry_logger_function_t(nativeLog), IntPtr.Zero); } options.DiagnosticLogger?.LogDebug("Initializing sentry native"); @@ -139,7 +141,7 @@ internal static string GetCacheDirectory(SentryUnityOptions options) // The logger we should forward native messages to. This is referenced by nativeLog() which in turn for. private static IDiagnosticLogger? _logger; - private static bool _isLinux = false; + private static bool _useLibC = false; // This method is called from the C library and forwards incoming messages to the currently set _logger. [MonoPInvokeCallback(typeof(sentry_logger_function_t))] @@ -183,20 +185,33 @@ private static void nativeLogImpl(int cLevel, IntPtr format, IntPtr args, IntPtr try { // We cannot access C var-arg (va_list) in c# thus we pass it back to vsnprintf to do the formatting. - // For Linux, we must make a copy of the VaList to be able to pass it back... - if (_isLinux) + // For Linux and PlayStation, we must make a copy of the VaList to be able to pass it back... + if (_useLibC) { var argsStruct = Marshal.PtrToStructure(args); var formattedLength = 0; + + // PlayStation uses a wrapper function to avoid IL2CPP conflicts with the Prospero SDK's vsnprintf + var isPlayStation = Application.platform is RuntimePlatform.PS4 or RuntimePlatform.PS5; + WithMarshalledStruct(argsStruct, argsPtr => { - formattedLength = 1 + vsnprintf_linux(IntPtr.Zero, UIntPtr.Zero, format, argsPtr); + formattedLength = 1 + (isPlayStation + ? vsnprintf_playstation(IntPtr.Zero, UIntPtr.Zero, format, argsPtr) + : vsnprintf_linux(IntPtr.Zero, UIntPtr.Zero, format, argsPtr)); }); WithAllocatedPtr(formattedLength, buffer => WithMarshalledStruct(argsStruct, argsPtr => { - vsnprintf_linux(buffer, (UIntPtr)formattedLength, format, argsPtr); + if (isPlayStation) + { + vsnprintf_playstation(buffer, (UIntPtr)formattedLength, format, argsPtr); + } + else + { + vsnprintf_linux(buffer, (UIntPtr)formattedLength, format, argsPtr); + } message = Marshal.PtrToStringAnsi(buffer); })); } @@ -233,6 +248,9 @@ private static void nativeLogImpl(int cLevel, IntPtr format, IntPtr args, IntPtr [DllImport("libc", EntryPoint = "vsnprintf")] private static extern int vsnprintf_linux(IntPtr buffer, UIntPtr bufferSize, IntPtr format, IntPtr args); + [DllImport("sentry", EntryPoint = "vsnprintf_sentry")] + private static extern int vsnprintf_playstation(IntPtr buffer, UIntPtr bufferSize, IntPtr format, IntPtr args); + // https://stackoverflow.com/a/4958507/2386130 [StructLayout(LayoutKind.Sequential, Pack = 4)] private struct VaListLinux64 From 26ce8df2a5570d371d78745e53e8ae2e6c7dbcf3 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 26 Nov 2025 13:42:45 +0100 Subject: [PATCH 05/17] Naming --- src/Sentry.Unity.Native/SentryNativeBridge.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Sentry.Unity.Native/SentryNativeBridge.cs b/src/Sentry.Unity.Native/SentryNativeBridge.cs index 21eb8fe1e..eaff0bb25 100644 --- a/src/Sentry.Unity.Native/SentryNativeBridge.cs +++ b/src/Sentry.Unity.Native/SentryNativeBridge.cs @@ -197,7 +197,7 @@ private static void nativeLogImpl(int cLevel, IntPtr format, IntPtr args, IntPtr WithMarshalledStruct(argsStruct, argsPtr => { formattedLength = 1 + (isPlayStation - ? vsnprintf_playstation(IntPtr.Zero, UIntPtr.Zero, format, argsPtr) + ? vsnprintf_ps(IntPtr.Zero, UIntPtr.Zero, format, argsPtr) : vsnprintf_linux(IntPtr.Zero, UIntPtr.Zero, format, argsPtr)); }); @@ -206,7 +206,7 @@ private static void nativeLogImpl(int cLevel, IntPtr format, IntPtr args, IntPtr { if (isPlayStation) { - vsnprintf_playstation(buffer, (UIntPtr)formattedLength, format, argsPtr); + vsnprintf_ps(buffer, (UIntPtr)formattedLength, format, argsPtr); } else { @@ -248,8 +248,8 @@ private static void nativeLogImpl(int cLevel, IntPtr format, IntPtr args, IntPtr [DllImport("libc", EntryPoint = "vsnprintf")] private static extern int vsnprintf_linux(IntPtr buffer, UIntPtr bufferSize, IntPtr format, IntPtr args); - [DllImport("sentry", EntryPoint = "vsnprintf_sentry")] - private static extern int vsnprintf_playstation(IntPtr buffer, UIntPtr bufferSize, IntPtr format, IntPtr args); + [DllImport("sentry")] + private static extern int vsnprintf_ps(IntPtr buffer, UIntPtr bufferSize, IntPtr format, IntPtr args); // https://stackoverflow.com/a/4958507/2386130 [StructLayout(LayoutKind.Sequential, Pack = 4)] From 5ec7294aa7261089868d25044f38d526e0156e31 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 26 Nov 2025 13:45:59 +0100 Subject: [PATCH 06/17] Startup time --- src/Sentry.Unity/SentryUnityOptions.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Sentry.Unity/SentryUnityOptions.cs b/src/Sentry.Unity/SentryUnityOptions.cs index eaa54dd47..dc5dc3ab0 100644 --- a/src/Sentry.Unity/SentryUnityOptions.cs +++ b/src/Sentry.Unity/SentryUnityOptions.cs @@ -343,8 +343,11 @@ internal SentryUnityOptions(IApplication? application = null, application ??= ApplicationAdapter.Instance; behaviour ??= SentryMonoBehaviour.Instance; - // IL2CPP doesn't support Process.GetCurrentProcess().StartupTime - DetectStartupTime = StartupTimeDetectionMode.Fast; + DetectStartupTime = application.Platform is RuntimePlatform.PS4 or RuntimePlatform.PS5 + // PlayStation doesn't support startup time + ? StartupTimeDetectionMode.None + // IL2CPP doesn't support Process.GetCurrentProcess().StartupTime + : StartupTimeDetectionMode.Fast; AddInAppExclude("UnityEngine"); AddInAppExclude("UnityEditor"); @@ -406,7 +409,8 @@ or RuntimePlatform.OSXPlayer or RuntimePlatform.OSXServer // Consoles: false RuntimePlatform.GameCoreXboxSeries or RuntimePlatform.GameCoreXboxOne - or RuntimePlatform.PS4 or RuntimePlatform.PS5 or RuntimePlatform.Switch => false, + or RuntimePlatform.PS4 or RuntimePlatform.PS5 + or RuntimePlatform.Switch => false, // Unknown platforms _ => false From 95eb4ed02999065c18665696be4d46b2e6ee4fc3 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 26 Nov 2025 14:27:41 +0100 Subject: [PATCH 07/17] Dynamic libs --- src/Sentry.Unity/NativeUtils/CFunctions.cs | 59 ++++++++++------------ 1 file changed, 26 insertions(+), 33 deletions(-) diff --git a/src/Sentry.Unity/NativeUtils/CFunctions.cs b/src/Sentry.Unity/NativeUtils/CFunctions.cs index 9fe635d84..76088e02b 100644 --- a/src/Sentry.Unity/NativeUtils/CFunctions.cs +++ b/src/Sentry.Unity/NativeUtils/CFunctions.cs @@ -8,13 +8,6 @@ namespace Sentry.Unity.NativeUtils; internal static class C { - // PlayStation and Xbox use static linking, other platforms use dynamic library -#if UNITY_PS4 || UNITY_PS5 || UNITY_GAMECORE - private const string LibraryName = "__Internal"; -#else - private const string LibraryName = "sentry"; -#endif - internal static void SetValueIfNotNull(sentry_value_t obj, string key, string? value) { if (value is not null) @@ -84,78 +77,78 @@ internal static void SetValueIfNotNull(sentry_value_t obj, string key, double? v return null; } - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern sentry_value_t sentry_value_new_object(); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern sentry_value_t sentry_value_new_null(); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern sentry_value_t sentry_value_new_bool(int value); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern sentry_value_t sentry_value_new_double(double value); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern sentry_value_t sentry_value_new_int32(int value); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern sentry_value_t sentry_value_new_string(string value); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern sentry_value_t sentry_value_new_breadcrumb(string? type, string? message); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern int sentry_value_set_by_key(sentry_value_t value, string k, sentry_value_t v); internal static bool IsNull(sentry_value_t value) => sentry_value_is_null(value) != 0; - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern int sentry_value_is_null(sentry_value_t value); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern int sentry_value_as_int32(sentry_value_t value); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern double sentry_value_as_double(sentry_value_t value); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern IntPtr sentry_value_as_string(sentry_value_t value); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern UIntPtr sentry_value_get_length(sentry_value_t value); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern sentry_value_t sentry_value_get_by_index(sentry_value_t value, UIntPtr index); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern sentry_value_t sentry_value_get_by_key(sentry_value_t value, string key); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern void sentry_set_context(string key, sentry_value_t value); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern void sentry_add_breadcrumb(sentry_value_t breadcrumb); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern void sentry_set_tag(string key, string value); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern void sentry_remove_tag(string key); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern void sentry_set_user(sentry_value_t user); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern void sentry_remove_user(); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern void sentry_set_extra(string key, sentry_value_t value); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern void sentry_remove_extra(string key); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern void sentry_set_trace(string traceId, string parentSpanId); internal static readonly Lazy> DebugImages = new(LoadDebugImages); @@ -209,10 +202,10 @@ private static IEnumerable LoadDebugImages() // Returns a new reference to an immutable, frozen list. // The reference must be released with `sentry_value_decref`. - [DllImport(LibraryName)] + [DllImport("sentry")] private static extern sentry_value_t sentry_get_modules_list(); - [DllImport(LibraryName)] + [DllImport("sentry")] internal static extern void sentry_value_decref(sentry_value_t value); // native union sentry_value_u/t From a79855b28dfcb5f54aa477ceb0d92cad4e39597e Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Wed, 26 Nov 2025 15:19:20 +0100 Subject: [PATCH 08/17] Updated CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7073780df..68e22deaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Features + +- Added PlayStation Native Support. The SDK now automatically syncs the scope - tags, breadcrumbs, context - to the native layer, so native crashes have the same rich context as managed events. ([#2433](https://github.com/getsentry/sentry-unity/pull/2433)) + ### Dependencies - Bump Cocoa SDK from v8.57.2 to v8.57.3 ([#2424](https://github.com/getsentry/sentry-unity/pull/2424)) From 1bba080ba7bb5bd8099f173ffbbc67c78dc6b323 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Thu, 27 Nov 2025 10:33:02 +0100 Subject: [PATCH 09/17] Moved wrapper into plugins --- package-dev/Plugins/PS5/sentry_utils.c | 20 +++++ .../Runtime/Sentry.Unity.Native.dll.meta | 83 +++++++------------ src/Sentry.Unity.Native/SentryNativeBridge.cs | 2 +- 3 files changed, 51 insertions(+), 54 deletions(-) create mode 100644 package-dev/Plugins/PS5/sentry_utils.c diff --git a/package-dev/Plugins/PS5/sentry_utils.c b/package-dev/Plugins/PS5/sentry_utils.c new file mode 100644 index 000000000..4d0f2084e --- /dev/null +++ b/package-dev/Plugins/PS5/sentry_utils.c @@ -0,0 +1,20 @@ +#include +#include + +/** + * Wrapper around vsnprintf for Unity C# IL2CPP interop. + * + * This function provides a stable ABI entry point for Unity to call + * vsnprintf functionality on PlayStation platforms. IL2CPP cannot directly + * call the vsnprintf from the Prospero SDK because: + * 1. IL2CPP generates a forward declaration with generic pointer types + * 2. This conflicts with the actual vsnprintf signature in stdio.h + * 3. va_list requires proper platform-specific handling + * + * This wrapper is compiled as native C code where va_list is properly + * understood, then IL2CPP calls this wrapper with generic pointers. + */ +int vsnprintf_ps(char *buffer, size_t size, const char *format, va_list args) +{ + return vsnprintf(buffer, size, format, args); +} diff --git a/package-dev/Runtime/Sentry.Unity.Native.dll.meta b/package-dev/Runtime/Sentry.Unity.Native.dll.meta index 9e9780954..b34174062 100644 --- a/package-dev/Runtime/Sentry.Unity.Native.dll.meta +++ b/package-dev/Runtime/Sentry.Unity.Native.dll.meta @@ -2,7 +2,7 @@ fileFormatVersion: 2 guid: bb324dd170e76fb4bbe06f959c323cbd PluginImporter: externalObjects: {} - serializedVersion: 2 + serializedVersion: 3 iconMap: {} executionOrder: {} defineConstraints: [] @@ -11,98 +11,75 @@ PluginImporter: isExplicitlyReferenced: 0 validateReferences: 1 platformData: - - first: - : Any - second: + Android: + enabled: 0 + settings: + AndroidLibraryDependee: UnityLibrary + AndroidSharedLibraryType: Executable + CPU: ARMv7 + Any: enabled: 0 settings: Exclude Android: 1 Exclude Editor: 0 Exclude Linux64: 0 Exclude OSXUniversal: 1 + Exclude PS5: 0 Exclude WebGL: 1 Exclude Win: 0 Exclude Win64: 0 Exclude iOS: 1 Exclude tvOS: 1 - - first: - Android: Android - second: - enabled: 0 - settings: - CPU: ARMv7 - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: + Editor: enabled: 1 settings: CPU: AnyCPU DefaultValueInitialized: true OS: AnyOS - - first: - Standalone: Linux64 - second: + GameCoreScarlett: + enabled: 1 + settings: + CPU: AnyCPU + GameCoreXboxOne: + enabled: 1 + settings: + CPU: AnyCPU + Linux64: enabled: 1 settings: CPU: x86_64 - - first: - Standalone: OSXUniversal - second: + OSXUniversal: enabled: 0 settings: CPU: None - - first: - Standalone: Win - second: + PS5: + enabled: 1 + settings: {} + Win: enabled: 1 settings: CPU: x86 - - first: - Standalone: Win64 - second: + Win64: enabled: 1 settings: CPU: x86_64 - - first: - Windows Store Apps: WindowsStoreApps - second: + WindowsStoreApps: enabled: 0 settings: CPU: AnyCPU - - first: - iPhone: iOS - second: + iOS: enabled: 0 settings: AddToEmbeddedBinaries: false CPU: AnyCPU CompileFlags: FrameworkDependencies: - - first: - tvOS: tvOS - second: + tvOS: enabled: 0 settings: CPU: AnyCPU CompileFlags: - FrameworkDependencies: - - first: - GameCoreScarlett: GameCoreScarlett - second: - enabled: 1 - settings: - CPU: AnyCPU - - first: - GameCoreXboxOne: GameCoreXboxOne - second: - enabled: 1 - settings: - CPU: AnyCPU + FrameworkDependencies: userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: \ No newline at end of file diff --git a/src/Sentry.Unity.Native/SentryNativeBridge.cs b/src/Sentry.Unity.Native/SentryNativeBridge.cs index eaff0bb25..7d72c171d 100644 --- a/src/Sentry.Unity.Native/SentryNativeBridge.cs +++ b/src/Sentry.Unity.Native/SentryNativeBridge.cs @@ -248,7 +248,7 @@ private static void nativeLogImpl(int cLevel, IntPtr format, IntPtr args, IntPtr [DllImport("libc", EntryPoint = "vsnprintf")] private static extern int vsnprintf_linux(IntPtr buffer, UIntPtr bufferSize, IntPtr format, IntPtr args); - [DllImport("sentry")] + [DllImport("__Internal")] private static extern int vsnprintf_ps(IntPtr buffer, UIntPtr bufferSize, IntPtr format, IntPtr args); // https://stackoverflow.com/a/4958507/2386130 From e8f6305105d5236770f2dc0d539c7ca7fc1d1f0a Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Thu, 27 Nov 2025 11:54:07 +0100 Subject: [PATCH 10/17] Removed 'PS4' --- src/Sentry.Unity.Editor/Native/BuildPostProcess.cs | 7 ++----- src/Sentry.Unity.Native/SentryNative.cs | 1 - src/Sentry.Unity.Native/SentryNativeBridge.cs | 4 ++-- src/Sentry.Unity/Il2CppEventProcessor.cs | 2 -- src/Sentry.Unity/Integrations/UnityScopeIntegration.cs | 4 +--- src/Sentry.Unity/SentryUnityOptions.cs | 5 ++--- src/Sentry.Unity/SentryUnityOptionsExtensions.cs | 2 +- .../SentryUnityOptionsExtensionsTests.cs | 4 +--- test/Sentry.Unity.Tests/SentryUnityOptionsTests.cs | 1 - 9 files changed, 9 insertions(+), 21 deletions(-) diff --git a/src/Sentry.Unity.Editor/Native/BuildPostProcess.cs b/src/Sentry.Unity.Editor/Native/BuildPostProcess.cs index a12c98495..eaabfb48d 100644 --- a/src/Sentry.Unity.Editor/Native/BuildPostProcess.cs +++ b/src/Sentry.Unity.Editor/Native/BuildPostProcess.cs @@ -19,7 +19,6 @@ public static void OnPostProcessBuild(BuildTarget target, string executablePath) var targetGroup = BuildPipeline.GetBuildTargetGroup(target); if (targetGroup is not BuildTargetGroup.Standalone and not BuildTargetGroup.GameCoreXboxSeries - and not BuildTargetGroup.PS4 and not BuildTargetGroup.PS5) { return; @@ -54,7 +53,7 @@ and not BuildTargetGroup.PS4 { BuildTargetGroup.Standalone => Path.GetDirectoryName(executablePath), BuildTargetGroup.GameCoreXboxSeries => executablePath, - BuildTargetGroup.PS4 or BuildTargetGroup.PS5 => executablePath, + BuildTargetGroup.PS5 => executablePath, _ => string.Empty }; @@ -91,7 +90,7 @@ and not BuildTargetGroup.PS4 BuildTarget.StandaloneOSX => options.MacosNativeSupportEnabled, BuildTarget.StandaloneLinux64 => options.LinuxNativeSupportEnabled, BuildTarget.GameCoreXboxSeries or BuildTarget.GameCoreXboxOne => options.XboxNativeSupportEnabled, - BuildTarget.PS4 or BuildTarget.PS5 => options.PlayStationNativeSupportEnabled, + BuildTarget.PS5 => options.PlayStationNativeSupportEnabled, _ => false, }; @@ -113,7 +112,6 @@ private static void AddCrashHandler(IDiagnosticLogger logger, BuildTarget target case BuildTarget.GameCoreXboxOne: // No standalone crash handler for Xbox - comes with Breakpad return; - case BuildTarget.PS4: case BuildTarget.PS5: // No standalone crash handler for PlayStation return; @@ -167,7 +165,6 @@ private static void UploadDebugSymbols(IDiagnosticLogger logger, BuildTarget tar paths += $" \"{xboxSentryPluginPath}\""; } break; - case BuildTarget.PS4: case BuildTarget.PS5: var playstationSentryPluginPath = Path.GetFullPath("Assets/Plugins/Sentry/"); if (Directory.Exists(playstationSentryPluginPath)) diff --git a/src/Sentry.Unity.Native/SentryNative.cs b/src/Sentry.Unity.Native/SentryNative.cs index 9cf67a3d6..fb4c5aa59 100644 --- a/src/Sentry.Unity.Native/SentryNative.cs +++ b/src/Sentry.Unity.Native/SentryNative.cs @@ -124,7 +124,6 @@ private static void ReinstallBackend() switch (application.Platform) { case RuntimePlatform.Switch: - case RuntimePlatform.PS4: case RuntimePlatform.PS5: case RuntimePlatform.XboxOne: case RuntimePlatform.GameCoreXboxSeries: diff --git a/src/Sentry.Unity.Native/SentryNativeBridge.cs b/src/Sentry.Unity.Native/SentryNativeBridge.cs index 7d72c171d..374f9a06a 100644 --- a/src/Sentry.Unity.Native/SentryNativeBridge.cs +++ b/src/Sentry.Unity.Native/SentryNativeBridge.cs @@ -18,7 +18,7 @@ public static bool Init(SentryUnityOptions options) { _useLibC = Application.platform is RuntimePlatform.LinuxPlayer or RuntimePlatform.LinuxServer - or RuntimePlatform.PS4 or RuntimePlatform.PS5; + or RuntimePlatform.PS5; var cOptions = sentry_options_new(); @@ -192,7 +192,7 @@ private static void nativeLogImpl(int cLevel, IntPtr format, IntPtr args, IntPtr var formattedLength = 0; // PlayStation uses a wrapper function to avoid IL2CPP conflicts with the Prospero SDK's vsnprintf - var isPlayStation = Application.platform is RuntimePlatform.PS4 or RuntimePlatform.PS5; + var isPlayStation = Application.platform is RuntimePlatform.PS5; WithMarshalledStruct(argsStruct, argsPtr => { diff --git a/src/Sentry.Unity/Il2CppEventProcessor.cs b/src/Sentry.Unity/Il2CppEventProcessor.cs index dd6b2f4dc..279b0b846 100644 --- a/src/Sentry.Unity/Il2CppEventProcessor.cs +++ b/src/Sentry.Unity/Il2CppEventProcessor.cs @@ -363,7 +363,6 @@ or RuntimePlatform.WindowsPlayer or RuntimePlatform.WindowsServer or RuntimePlatform.GameCoreXboxSeries or RuntimePlatform.GameCoreXboxOne - or RuntimePlatform.PS4 or RuntimePlatform.PS5; } @@ -375,7 +374,6 @@ private string GetPlatformDebugImageType(RuntimePlatform? platform = null) case RuntimePlatform.Android: case RuntimePlatform.LinuxPlayer: case RuntimePlatform.LinuxServer: - case RuntimePlatform.PS4: case RuntimePlatform.PS5: return "elf"; case RuntimePlatform.IPhonePlayer: diff --git a/src/Sentry.Unity/Integrations/UnityScopeIntegration.cs b/src/Sentry.Unity/Integrations/UnityScopeIntegration.cs index ca1e0415e..056396257 100644 --- a/src/Sentry.Unity/Integrations/UnityScopeIntegration.cs +++ b/src/Sentry.Unity/Integrations/UnityScopeIntegration.cs @@ -83,9 +83,7 @@ is RuntimePlatform.GameCoreXboxSeries { operatingSystemContext.Name = "Xbox"; } - else if (ApplicationAdapter.Instance.Platform - is RuntimePlatform.PS4 - or RuntimePlatform.PS5) + else if (ApplicationAdapter.Instance.Platform is RuntimePlatform.PS5) { operatingSystemContext.Name = "PlayStation"; } diff --git a/src/Sentry.Unity/SentryUnityOptions.cs b/src/Sentry.Unity/SentryUnityOptions.cs index db0680c8d..d826b8be8 100644 --- a/src/Sentry.Unity/SentryUnityOptions.cs +++ b/src/Sentry.Unity/SentryUnityOptions.cs @@ -370,7 +370,7 @@ internal SentryUnityOptions(IApplication? application = null, application ??= ApplicationAdapter.Instance; behaviour ??= SentryMonoBehaviour.Instance; - DetectStartupTime = application.Platform is RuntimePlatform.PS4 or RuntimePlatform.PS5 + DetectStartupTime = application.Platform is RuntimePlatform.PS5 // PlayStation doesn't support startup time ? StartupTimeDetectionMode.None // IL2CPP doesn't support Process.GetCurrentProcess().StartupTime @@ -436,7 +436,7 @@ or RuntimePlatform.OSXPlayer or RuntimePlatform.OSXServer // Consoles: false RuntimePlatform.GameCoreXboxSeries or RuntimePlatform.GameCoreXboxOne - or RuntimePlatform.PS4 or RuntimePlatform.PS5 + or RuntimePlatform.PS5 or RuntimePlatform.Switch => false, // Unknown platforms @@ -502,7 +502,6 @@ or RuntimePlatform.LinuxServer or RuntimePlatform.WebGLPlayer or RuntimePlatform.GameCoreXboxSeries or RuntimePlatform.GameCoreXboxOne - or RuntimePlatform.PS4 or RuntimePlatform.PS5; } diff --git a/src/Sentry.Unity/SentryUnityOptionsExtensions.cs b/src/Sentry.Unity/SentryUnityOptionsExtensions.cs index b7c0f71bc..48e75ef31 100644 --- a/src/Sentry.Unity/SentryUnityOptionsExtensions.cs +++ b/src/Sentry.Unity/SentryUnityOptionsExtensions.cs @@ -59,7 +59,7 @@ internal static bool IsNativeSupportEnabled(this SentryUnityOptions options, Run RuntimePlatform.OSXPlayer or RuntimePlatform.OSXServer => options.MacosNativeSupportEnabled, RuntimePlatform.LinuxPlayer or RuntimePlatform.LinuxServer => options.LinuxNativeSupportEnabled, RuntimePlatform.GameCoreXboxSeries or RuntimePlatform.GameCoreXboxOne => options.XboxNativeSupportEnabled, - RuntimePlatform.PS4 or RuntimePlatform.PS5 => options.PlayStationNativeSupportEnabled, + RuntimePlatform.PS5 => options.PlayStationNativeSupportEnabled, _ => false }; } diff --git a/test/Sentry.Unity.Tests/SentryUnityOptionsExtensionsTests.cs b/test/Sentry.Unity.Tests/SentryUnityOptionsExtensionsTests.cs index f7a8a622c..8ba703b9b 100644 --- a/test/Sentry.Unity.Tests/SentryUnityOptionsExtensionsTests.cs +++ b/test/Sentry.Unity.Tests/SentryUnityOptionsExtensionsTests.cs @@ -186,8 +186,6 @@ public void DisableUnhandledExceptionCapture_DoesNotRemoveUnityApplicationLoggin } [Test] - [TestCase(RuntimePlatform.PS4, true, true)] - [TestCase(RuntimePlatform.PS4, false, false)] [TestCase(RuntimePlatform.PS5, true, true)] [TestCase(RuntimePlatform.PS5, false, false)] [TestCase(RuntimePlatform.GameCoreXboxSeries, true, true)] @@ -198,7 +196,7 @@ public void IsNativeSupportEnabled_ConsolePlatforms_ReturnsExpectedValue( RuntimePlatform platform, bool optionEnabled, bool expectedResult) { var options = _fixture.GetSut(); - options.PlayStationNativeSupportEnabled = platform is RuntimePlatform.PS4 or RuntimePlatform.PS5 + options.PlayStationNativeSupportEnabled = platform is RuntimePlatform.PS5 ? optionEnabled : options.PlayStationNativeSupportEnabled; options.XboxNativeSupportEnabled = platform is RuntimePlatform.GameCoreXboxSeries or RuntimePlatform.GameCoreXboxOne diff --git a/test/Sentry.Unity.Tests/SentryUnityOptionsTests.cs b/test/Sentry.Unity.Tests/SentryUnityOptionsTests.cs index f837ade73..63c976844 100644 --- a/test/Sentry.Unity.Tests/SentryUnityOptionsTests.cs +++ b/test/Sentry.Unity.Tests/SentryUnityOptionsTests.cs @@ -97,7 +97,6 @@ public void Ctor_Release_IgnoresDotOnlyProductNames() [TestCase(RuntimePlatform.IPhonePlayer, false)] [TestCase(RuntimePlatform.GameCoreXboxSeries, false)] [TestCase(RuntimePlatform.GameCoreXboxOne, false)] - [TestCase(RuntimePlatform.PS4, false)] [TestCase(RuntimePlatform.PS5, false)] [TestCase(RuntimePlatform.Switch, false)] [TestCase(RuntimePlatform.WindowsEditor, false)] From 5186660e7757811e7931a297f4fba7a503b59129 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Thu, 27 Nov 2025 12:29:10 +0100 Subject: [PATCH 11/17] Updated snapshot --- test/Scripts.Tests/package-release.zip.snapshot | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/Scripts.Tests/package-release.zip.snapshot b/test/Scripts.Tests/package-release.zip.snapshot index 3cf060b7f..397fd06c8 100644 --- a/test/Scripts.Tests/package-release.zip.snapshot +++ b/test/Scripts.Tests/package-release.zip.snapshot @@ -31,6 +31,7 @@ Plugins/Android.meta Plugins/iOS.meta Plugins/Linux.meta Plugins/macOS.meta +Plugins/PS5.meta Plugins/Windows.meta Plugins/macOS/Sentry.meta Plugins/macOS/SentryNativeBridge.m @@ -39,6 +40,8 @@ Plugins/macOS/Sentry/Sentry.dylib Plugins/macOS/Sentry/Sentry.dylib.dSYM Plugins/macOS/Sentry/Sentry.dylib.dSYM.meta Plugins/macOS/Sentry/Sentry.dylib.meta +Plugins/PS5/sentry_utils.c +Plugins/PS5/sentry_utils.c.meta Plugins/iOS/SentryCxaThrowHook.cpp Plugins/iOS/SentryCxaThrowHook.cpp.meta Plugins/iOS/SentryNativeBridge.m From ac49d1ea1be194c667dabd32525713677739f7e5 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Thu, 27 Nov 2025 12:34:25 +0100 Subject: [PATCH 12/17] Missed an if --- package-dev/Runtime/SentryInitialization.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-dev/Runtime/SentryInitialization.cs b/package-dev/Runtime/SentryInitialization.cs index c65ba8602..f3ee41ff4 100644 --- a/package-dev/Runtime/SentryInitialization.cs +++ b/package-dev/Runtime/SentryInitialization.cs @@ -7,7 +7,7 @@ #define SENTRY_NATIVE #elif UNITY_GAMECORE #define SENTRY_NATIVE -#elif UNITY_PS4 || UNITY_PS5 +#elif UNITY_PS5 #define SENTRY_NATIVE #elif UNITY_WEBGL #define SENTRY_WEBGL @@ -133,7 +133,7 @@ private Il2CppMethods _il2CppMethods return null; } -#if UNITY_ANDROID || UNITY_STANDALONE_LINUX || UNITY_PS4 || UNITY_PS5 +#if UNITY_ANDROID || UNITY_STANDALONE_LINUX || UNITY_PS5 // For ELF platforms, the 20-byte `NT_GNU_BUILD_ID` needs to be // turned into a "little-endian GUID", which means the first three // components need to be byte-swapped appropriately. From 2018f195ae3922a451ea293b63d8ff5a29ceb6de Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Thu, 27 Nov 2025 15:19:01 +0100 Subject: [PATCH 13/17] Fixed .meta --- package-dev/Plugins/PS5/sentry_utils.c.meta | 114 ++++++++++++++++++ .../Runtime/Sentry.Unity.Native.dll.meta | 95 ++++++++++----- .../Runtime/io.sentry.unity.runtime.asmdef | 1 - 3 files changed, 176 insertions(+), 34 deletions(-) create mode 100644 package-dev/Plugins/PS5/sentry_utils.c.meta diff --git a/package-dev/Plugins/PS5/sentry_utils.c.meta b/package-dev/Plugins/PS5/sentry_utils.c.meta new file mode 100644 index 000000000..8ea659a38 --- /dev/null +++ b/package-dev/Plugins/PS5/sentry_utils.c.meta @@ -0,0 +1,114 @@ +fileFormatVersion: 2 +guid: 8aaa83ee4eed24fd7924da6ccc005b3e +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude PS5: 0 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: x86_64 + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: x86_64 + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 0 + settings: + AddToEmbeddedBinaries: false + CPU: AnyCPU + CompileFlags: + FrameworkDependencies: + - first: + tvOS: tvOS + second: + enabled: 0 + settings: + CPU: AnyCPU + CompileFlags: + FrameworkDependencies: + - first: + GameCoreScarlett: GameCoreScarlett + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + GameCoreXboxOne: GameCoreXboxOne + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + PS5: PS5 + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/package-dev/Runtime/Sentry.Unity.Native.dll.meta b/package-dev/Runtime/Sentry.Unity.Native.dll.meta index b34174062..cf3f09fc1 100644 --- a/package-dev/Runtime/Sentry.Unity.Native.dll.meta +++ b/package-dev/Runtime/Sentry.Unity.Native.dll.meta @@ -2,7 +2,7 @@ fileFormatVersion: 2 guid: bb324dd170e76fb4bbe06f959c323cbd PluginImporter: externalObjects: {} - serializedVersion: 3 + serializedVersion: 2 iconMap: {} executionOrder: {} defineConstraints: [] @@ -11,13 +11,9 @@ PluginImporter: isExplicitlyReferenced: 0 validateReferences: 1 platformData: - Android: - enabled: 0 - settings: - AndroidLibraryDependee: UnityLibrary - AndroidSharedLibraryType: Executable - CPU: ARMv7 - Any: + - first: + : Any + second: enabled: 0 settings: Exclude Android: 1 @@ -30,56 +26,89 @@ PluginImporter: Exclude Win64: 0 Exclude iOS: 1 Exclude tvOS: 1 - Editor: + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: enabled: 1 settings: CPU: AnyCPU DefaultValueInitialized: true OS: AnyOS - GameCoreScarlett: - enabled: 1 - settings: - CPU: AnyCPU - GameCoreXboxOne: - enabled: 1 - settings: - CPU: AnyCPU - Linux64: + - first: + Standalone: Linux64 + second: enabled: 1 settings: CPU: x86_64 - OSXUniversal: + - first: + Standalone: OSXUniversal + second: enabled: 0 settings: CPU: None - PS5: - enabled: 1 - settings: {} - Win: + - first: + Standalone: Win + second: enabled: 1 settings: CPU: x86 - Win64: + - first: + Standalone: Win64 + second: enabled: 1 settings: CPU: x86_64 - WindowsStoreApps: + - first: + Windows Store Apps: WindowsStoreApps + second: enabled: 0 settings: CPU: AnyCPU - iOS: + - first: + iPhone: iOS + second: enabled: 0 settings: AddToEmbeddedBinaries: false CPU: AnyCPU - CompileFlags: - FrameworkDependencies: - tvOS: + CompileFlags: + FrameworkDependencies: + - first: + tvOS: tvOS + second: enabled: 0 settings: CPU: AnyCPU - CompileFlags: - FrameworkDependencies: - userData: - assetBundleName: + CompileFlags: + FrameworkDependencies: + - first: + GameCoreScarlett: GameCoreScarlett + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + GameCoreXboxOne: GameCoreXboxOne + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + PS5: PS5 + second: + enabled: 1 + settings: {} + userData: + assetBundleName: assetBundleVariant: \ No newline at end of file diff --git a/package/Runtime/io.sentry.unity.runtime.asmdef b/package/Runtime/io.sentry.unity.runtime.asmdef index e08af586e..362246eb7 100644 --- a/package/Runtime/io.sentry.unity.runtime.asmdef +++ b/package/Runtime/io.sentry.unity.runtime.asmdef @@ -11,7 +11,6 @@ "LinuxStandalone64", "Lumin", "macOSStandalone", - "PS4", "PS5", "Stadia", "Switch", From 0388e77ce0f3f0fee7d9ddaab47afafa628f9722 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Fri, 28 Nov 2025 09:34:36 +0100 Subject: [PATCH 14/17] Reimported .meta --- .../Runtime/Sentry.Unity.Native.dll.meta | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/package-dev/Runtime/Sentry.Unity.Native.dll.meta b/package-dev/Runtime/Sentry.Unity.Native.dll.meta index cf3f09fc1..e85bd71cc 100644 --- a/package-dev/Runtime/Sentry.Unity.Native.dll.meta +++ b/package-dev/Runtime/Sentry.Unity.Native.dll.meta @@ -33,7 +33,7 @@ PluginImporter: settings: CPU: ARMv7 - first: - Any: + Any: second: enabled: 0 settings: {} @@ -45,12 +45,29 @@ PluginImporter: CPU: AnyCPU DefaultValueInitialized: true OS: AnyOS + - first: + GameCoreScarlett: GameCoreScarlett + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + GameCoreXboxOne: GameCoreXboxOne + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + PS5: PS5 + second: + enabled: 1 + settings: {} - first: Standalone: Linux64 second: enabled: 1 settings: - CPU: x86_64 + CPU: AnyCPU - first: Standalone: OSXUniversal second: @@ -62,13 +79,13 @@ PluginImporter: second: enabled: 1 settings: - CPU: x86 + CPU: AnyCPU - first: Standalone: Win64 second: enabled: 1 settings: - CPU: x86_64 + CPU: AnyCPU - first: Windows Store Apps: WindowsStoreApps second: @@ -82,33 +99,16 @@ PluginImporter: settings: AddToEmbeddedBinaries: false CPU: AnyCPU - CompileFlags: - FrameworkDependencies: + CompileFlags: + FrameworkDependencies: - first: tvOS: tvOS second: enabled: 0 settings: CPU: AnyCPU - CompileFlags: - FrameworkDependencies: - - first: - GameCoreScarlett: GameCoreScarlett - second: - enabled: 1 - settings: - CPU: AnyCPU - - first: - GameCoreXboxOne: GameCoreXboxOne - second: - enabled: 1 - settings: - CPU: AnyCPU - - first: - PS5: PS5 - second: - enabled: 1 - settings: {} - userData: - assetBundleName: - assetBundleVariant: \ No newline at end of file + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: From 8ccd22c828d71c6cce1b5d43c96911033c97b789 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Fri, 28 Nov 2025 12:27:29 +0100 Subject: [PATCH 15/17] Unified vsnprintf wrapper --- package-dev/Plugins/PS5/sentry_utils.c | 20 ------------- package-dev/Plugins/sentry_utils.c | 16 +++++++++++ .../Plugins/{PS5 => }/sentry_utils.c.meta | 16 +++++------ src/Sentry.Unity.Native/SentryNativeBridge.cs | 28 ++++--------------- 4 files changed, 29 insertions(+), 51 deletions(-) delete mode 100644 package-dev/Plugins/PS5/sentry_utils.c create mode 100644 package-dev/Plugins/sentry_utils.c rename package-dev/Plugins/{PS5 => }/sentry_utils.c.meta (91%) diff --git a/package-dev/Plugins/PS5/sentry_utils.c b/package-dev/Plugins/PS5/sentry_utils.c deleted file mode 100644 index 4d0f2084e..000000000 --- a/package-dev/Plugins/PS5/sentry_utils.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include - -/** - * Wrapper around vsnprintf for Unity C# IL2CPP interop. - * - * This function provides a stable ABI entry point for Unity to call - * vsnprintf functionality on PlayStation platforms. IL2CPP cannot directly - * call the vsnprintf from the Prospero SDK because: - * 1. IL2CPP generates a forward declaration with generic pointer types - * 2. This conflicts with the actual vsnprintf signature in stdio.h - * 3. va_list requires proper platform-specific handling - * - * This wrapper is compiled as native C code where va_list is properly - * understood, then IL2CPP calls this wrapper with generic pointers. - */ -int vsnprintf_ps(char *buffer, size_t size, const char *format, va_list args) -{ - return vsnprintf(buffer, size, format, args); -} diff --git a/package-dev/Plugins/sentry_utils.c b/package-dev/Plugins/sentry_utils.c new file mode 100644 index 000000000..da1e1062e --- /dev/null +++ b/package-dev/Plugins/sentry_utils.c @@ -0,0 +1,16 @@ +#include +#include + +/** + * Wrapper around vsnprintf for Unity C# IL2CPP interop. + * + * This function provides a stable ABI entry point for Unity to call + * vsnprintf functionality across Windows, Linux, and PlayStation platforms. + * + * This wrapper is compiled as native C code where va_list is properly + * understood, then IL2CPP calls this wrapper with generic pointers. + */ +int vsnprintf_sentry(char *buffer, size_t size, const char *format, va_list args) +{ + return vsnprintf(buffer, size, format, args); +} diff --git a/package-dev/Plugins/PS5/sentry_utils.c.meta b/package-dev/Plugins/sentry_utils.c.meta similarity index 91% rename from package-dev/Plugins/PS5/sentry_utils.c.meta rename to package-dev/Plugins/sentry_utils.c.meta index 8ea659a38..d885aef03 100644 --- a/package-dev/Plugins/PS5/sentry_utils.c.meta +++ b/package-dev/Plugins/sentry_utils.c.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8aaa83ee4eed24fd7924da6ccc005b3e +guid: 6ddd83aa3aac13bc6813ca5bbb004a2d PluginImporter: externalObjects: {} serializedVersion: 2 @@ -18,12 +18,12 @@ PluginImporter: settings: Exclude Android: 1 Exclude Editor: 1 - Exclude Linux64: 1 + Exclude Linux64: 0 Exclude OSXUniversal: 1 Exclude PS5: 0 Exclude WebGL: 1 - Exclude Win: 1 - Exclude Win64: 1 + Exclude Win: 0 + Exclude Win64: 0 Exclude iOS: 1 Exclude tvOS: 1 - first: @@ -48,7 +48,7 @@ PluginImporter: - first: Standalone: Linux64 second: - enabled: 0 + enabled: 1 settings: CPU: x86_64 - first: @@ -60,13 +60,13 @@ PluginImporter: - first: Standalone: Win second: - enabled: 0 + enabled: 1 settings: CPU: x86 - first: Standalone: Win64 second: - enabled: 0 + enabled: 1 settings: CPU: x86_64 - first: @@ -111,4 +111,4 @@ PluginImporter: settings: {} userData: assetBundleName: - assetBundleVariant: + assetBundleVariant: diff --git a/src/Sentry.Unity.Native/SentryNativeBridge.cs b/src/Sentry.Unity.Native/SentryNativeBridge.cs index 8ac7b74e1..c29a398a3 100644 --- a/src/Sentry.Unity.Native/SentryNativeBridge.cs +++ b/src/Sentry.Unity.Native/SentryNativeBridge.cs @@ -202,36 +202,24 @@ private static void nativeLogImpl(int cLevel, IntPtr format, IntPtr args, IntPtr var argsStruct = Marshal.PtrToStructure(args); var formattedLength = 0; - // PlayStation uses a wrapper function to avoid IL2CPP conflicts with the Prospero SDK's vsnprintf - var isPlayStation = Application.platform is RuntimePlatform.PS5; - WithMarshalledStruct(argsStruct, argsPtr => { - formattedLength = 1 + (isPlayStation - ? vsnprintf_ps(IntPtr.Zero, UIntPtr.Zero, format, argsPtr) - : vsnprintf_linux(IntPtr.Zero, UIntPtr.Zero, format, argsPtr)); + formattedLength = 1 + vsnprintf_sentry(IntPtr.Zero, UIntPtr.Zero, format, argsPtr); }); WithAllocatedPtr(formattedLength, buffer => WithMarshalledStruct(argsStruct, argsPtr => { - if (isPlayStation) - { - vsnprintf_ps(buffer, (UIntPtr)formattedLength, format, argsPtr); - } - else - { - vsnprintf_linux(buffer, (UIntPtr)formattedLength, format, argsPtr); - } + vsnprintf_sentry(buffer, (UIntPtr)formattedLength, format, argsPtr); message = Marshal.PtrToStringAnsi(buffer); })); } else { - var formattedLength = 1 + vsnprintf_windows(IntPtr.Zero, UIntPtr.Zero, format, args); + var formattedLength = 1 + vsnprintf_sentry(IntPtr.Zero, UIntPtr.Zero, format, args); WithAllocatedPtr(formattedLength, buffer => { - vsnprintf_windows(buffer, (UIntPtr)formattedLength, format, args); + vsnprintf_sentry(buffer, (UIntPtr)formattedLength, format, args); message = Marshal.PtrToStringAnsi(buffer); }); } @@ -253,14 +241,8 @@ private static void nativeLogImpl(int cLevel, IntPtr format, IntPtr args, IntPtr } } - [DllImport("msvcrt", EntryPoint = "vsnprintf")] - private static extern int vsnprintf_windows(IntPtr buffer, UIntPtr bufferSize, IntPtr format, IntPtr args); - - [DllImport("libc", EntryPoint = "vsnprintf")] - private static extern int vsnprintf_linux(IntPtr buffer, UIntPtr bufferSize, IntPtr format, IntPtr args); - [DllImport("__Internal")] - private static extern int vsnprintf_ps(IntPtr buffer, UIntPtr bufferSize, IntPtr format, IntPtr args); + private static extern int vsnprintf_sentry(IntPtr buffer, UIntPtr bufferSize, IntPtr format, IntPtr args); // https://stackoverflow.com/a/4958507/2386130 [StructLayout(LayoutKind.Sequential, Pack = 4)] From f01bf878ee23d84fe29c0418ff19e2e36bd402e5 Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Fri, 28 Nov 2025 12:59:23 +0100 Subject: [PATCH 16/17] Updated snapshot --- test/Scripts.Tests/package-release.zip.snapshot | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/Scripts.Tests/package-release.zip.snapshot b/test/Scripts.Tests/package-release.zip.snapshot index 397fd06c8..3087982b7 100644 --- a/test/Scripts.Tests/package-release.zip.snapshot +++ b/test/Scripts.Tests/package-release.zip.snapshot @@ -31,7 +31,8 @@ Plugins/Android.meta Plugins/iOS.meta Plugins/Linux.meta Plugins/macOS.meta -Plugins/PS5.meta +Plugins/sentry_utils.c +Plugins/sentry_utils.c.meta Plugins/Windows.meta Plugins/macOS/Sentry.meta Plugins/macOS/SentryNativeBridge.m @@ -40,8 +41,6 @@ Plugins/macOS/Sentry/Sentry.dylib Plugins/macOS/Sentry/Sentry.dylib.dSYM Plugins/macOS/Sentry/Sentry.dylib.dSYM.meta Plugins/macOS/Sentry/Sentry.dylib.meta -Plugins/PS5/sentry_utils.c -Plugins/PS5/sentry_utils.c.meta Plugins/iOS/SentryCxaThrowHook.cpp Plugins/iOS/SentryCxaThrowHook.cpp.meta Plugins/iOS/SentryNativeBridge.m From be9b69270b5779d59cd00ad3a2f8ab2284d50b1a Mon Sep 17 00:00:00 2001 From: bitsandfoxes Date: Fri, 28 Nov 2025 14:44:56 +0100 Subject: [PATCH 17/17] Missed platforms --- package-dev/Plugins/sentry_utils.c.meta | 4 ++-- package-dev/Runtime/io.sentry.unity.dev.runtime.asmdef | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package-dev/Plugins/sentry_utils.c.meta b/package-dev/Plugins/sentry_utils.c.meta index d885aef03..1eee3502d 100644 --- a/package-dev/Plugins/sentry_utils.c.meta +++ b/package-dev/Plugins/sentry_utils.c.meta @@ -95,13 +95,13 @@ PluginImporter: - first: GameCoreScarlett: GameCoreScarlett second: - enabled: 0 + enabled: 1 settings: CPU: AnyCPU - first: GameCoreXboxOne: GameCoreXboxOne second: - enabled: 0 + enabled: 1 settings: CPU: AnyCPU - first: diff --git a/package-dev/Runtime/io.sentry.unity.dev.runtime.asmdef b/package-dev/Runtime/io.sentry.unity.dev.runtime.asmdef index c59d5f126..2bd1fdd87 100644 --- a/package-dev/Runtime/io.sentry.unity.dev.runtime.asmdef +++ b/package-dev/Runtime/io.sentry.unity.dev.runtime.asmdef @@ -11,7 +11,6 @@ "LinuxStandalone64", "Lumin", "macOSStandalone", - "PS4", "PS5", "Stadia", "Switch",