Releases: getsentry/sentry-unity
4.0.0
Breaking Changes
- Removed Unity 2020 support, which reached End of Life in 2023. Minimum supported version now is 2021. (#2313)
sentry-nativeis now built on Ubuntu 22.04 instead of Ubuntu 20.04, which reached EOL in May 2025. If you are running you game on a server on Ubuntu 20.04, you should update the OS before upgrading to this SDK version. (#2355)- The Unity SDK's static API has been moved from
Sentry.Unity.SentryUnityandSentry.SentrySdktoSentry.Unity.SentrySdk. This change enables manual/programatic SDK initialization with full functionality, previously only available through auto-initialization. The underlying .NET SDK'sSentrySdkclass is now internal, and several previously public classes likeSentryInitializationandSentryIntegrationsare now internal. Migration: Update yourusingdirectives fromusing Sentry;tousing Sentry.Unity;. IDEs like Rider can automatically import the missing references. In some cases, you may need bothusing Sentry.Unity;(for the static API) andusing Sentry;(for types likeSentryId). No changes are required to your actual SDK method calls (e.g.,SentrySdk.CaptureException()remains the same). (#2227, #2239) - The deprecated Runtime- and BuildTime-Configuration have been removed in favor of the single
OptionsConfigurationscript. When migrating you can make use of preprocessor directives to set specific options for specific platforms. Check out the Migration Guide. (#2337) - Renamed the option
AttachBreadcrumbsToEventstoAddBreadcrumbsWithStructuredLogsto better reflect its purpose. The option controls if the SDK does BOTH: attach logs as breadcrumbs to events and send them as structured logs (#2455) SetBeforeCaptureScreenshotsignature changed fromFunc<bool>toFunc<SentryEvent, bool>, now receiving the event that triggered the screenshot capture. This allows context-aware decisions before capture begins. (#2428)SetBeforeCaptureViewHierarchysignature changed fromFunc<bool>toFunc<SentryEvent, bool>, now receiving the event that triggered the view hierarchy capture. This allows context-aware decisions before capture begins. (#2429)BreadcrumbLevel.Criticalhas been renamed toBreadcrumbLevel.Fatalfor consistency with the other Sentry SDKs (#4605)- Removed
SentrySdk.CaptureUserFeedbackand all associated members. Use the newerSentrySdk.CaptureFeedbackinstead. (#4619) ScopeExtensions.Populateis now internal (#4611)- Backpressure handling is now enabled by default, meaning that the SDK will monitor system health and reduce the sampling rate of events and transactions when the system is under load. When the system is determined to be healthy again, the sampling rates are returned to their original levels. (#4615)
- Spans and Transactions now implement
IDisposableso that they can be used withusingstatements/declarations that will automatically finish the span with a status of OK when it passes out of scope, if it has not already been finished, to be consistent withActivityclasses when using OpenTelemetry (#4627) SpanTracerandTransactionTracerare still public but these are nowsealed(#4627)CaptureFeedbacknow returns aSentryIdand aCaptureFeedbackResultout parameter that indicate whether feedback was captured successfully and what the reason for failure was otherwise (#4613)- The SDK will now always add a breadcrumb when capturing an exception. The option to opt-out of this has been removed. (#2335)
Behavioural Changes
- The SDK no longer refreshes the trace ID when the game loses and regains focus. This means that the trace ID persists from game start to game end. The SDK now also automatically adds breadcrumbs on those lifecycle events. (#2374)
- The SDK no longer sets tags automatically. The promotion of contexts to tags now happens exclusively in Sentry. The
Unitycontext got extended byIsMainThreadfor this. The tagsunity.device.unique_identifierandunity.gpu.supports_instancingno longer exist and have no replacement. (#2459)
Fixes
- When targeting Windows or Linux with Mono as the scripting backend, to prevent crashes, the native SDK's debug logger integration is disabled. (#2445)
- Fixed race conditions that could cause crashes when targeting Android, especially in concurrent scenarios. The ThreadPool used to sync scope to the native layer could prematurely detach threads from the JVM. This is solved by using a dedicated background worker thread that properly manages JNI lifecycle. (#2426)
- Fixed memory leak when finishing an unsampled Transaction that has started unsampled Spans (#4717)
- The SDK now avoids redundant scope sync after transaction finish (#4623)
- Fixed the extension methods on the options to disable unhandled exception capture and the logging integration (#2413)
- Fixed the breadcrumb format for lifecycle events (#2407)
- When targeting iOS, the
WatchdogTerminationIntegrationnow defaults tofalseas to not report false positives. Users can control this through the optionIosWatchdogTerminationIntegrationEnabled(#2403) - The SDK now correctly sets the currently active scene's name on the event (#2400)
- Fixed an issue where screenshot capture triggered on a burst job would crash the game. The SDK can now also capture screenshots on events that occur outside of the main thread (#2392)
- Structured logs now have the
originandsdkattributes correctly set (#2390) - Resolved possible startup crashes on Android VR platforms like the Oculus Quest. The SDK no longer natively subscribes to interaction hooks for automatic tracing and breadcrumb creation. (#2393)
- When configured, the SDK now no longer treats
Debug.LogErrorevents as exceptions but resports them as message events instead (#2377) - When targeting Xbox, the SDK now correctly picks up the debug symbols for sentry-native from the
Assets/Plugins/Sentrydirectory (#2363) - Fixed crashes when adding breadcrumbs on iOS/macOS. This was caused by invalid date parsing and corrupted string data in the native bridge responsible for scope sync (#2327, #2338)
- Fixed input handling in samples to work with old and new input system (#2319)
- The SDK now captures exceptions on WebGL through the logging integration instead of the incompatible log handler, providing better stack trace support. (#2322)
- The SDK no longer accesses
AnalyticsSessionInfo.userIdwhen targeting console platforms. This was leading to crashes during launch. (#2309) - The SDK now deduplicates trace generation during startup and scene loading (#2301)
- The SDK no longer appends multiple upload tasks when building for Android (#2300)
- Fixed false positive ANR events on
WebGL, i.e. when switching tabs, or unfocusing the player (#2306) - The SDK now automatically picks up previously missing debug symbols - i.e.
BurstDebugInformation, by passing the target directory path to Sentry CLI. Sentry CLI then automatically and recursively picks up any not yet uploaded symbols. (#2298) - The check used to verify whether the current thread is the main-thread now includes
JobsUtility.IsExecutingJobto support running in Burst. (#2226) - For targeting iOS, the Unity SDK now brings an iOS-only
.xcframework, reducing package size. (#2264) - The SDK now waits for 'End of Frame' before capturing a screenshot. This should address any blank or malformed screenshots previously attached to events. The SDK now also only captu...
4.0.0-beta.7
Breaking Changes
SetBeforeCaptureScreenshotsignature changed fromFunc<bool>toFunc<SentryEvent, bool>, now receiving the event that
triggered the screenshot capture. This allows context-aware decisions before capture begins. (#2428)SetBeforeCaptureViewHierarchysignature changed fromFunc<bool>toFunc<SentryEvent, bool>, now receiving the event that
triggered the view hierarchy capture. This allows context-aware decisions before capture begins. (#2429)
Fixes
- When targeting Windows or Linux with Mono as the scripting backend, to prevent crashes, the native SDK's debug logger integration is disabled. (#2445)
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)
- On Windows, and with screenshot capture enabled, the SDK will now also capture and attach a screenshot to native crashes (#2434)
- Added
SetBeforeSendScreenshot(Func<Texture2D, SentryEvent, Texture2D?>)callback that provides the captured screenshot as a
Texture2Dbefore JPEG compression. (#2428)
This enables:- Modifying the screenshot in-place (e.g., blurring sensitive UI areas, redacting PII)
- Replacing the screenshot with a different
Texture2D - Discarding the screenshot by returning
null - Access to the event context for conditional processing
- Added
SetBeforeSendViewHierarchy(Func<ViewHierarchy, SentryEvent, ViewHierarchy?>)callback that provides the captured
ViewHierarchyto be modified before compression. (#2429)
Dependencies
4.0.0-beta.6
4.0.0-beta.5
Features
- The SDK automatically subscribes to and leaves breadcrumbs for
Application.lowMemoryevents (#2406) - The SDK now also reports the currently allocated memory when reporting an event or transaction. (#2398)
- The SDK defaults
EnvironmentUserto sensible values based on the current platform. This is still guarded by theSendDefaultPIIflag. (#2402)
Fixes
- Fixed the extension methods on the options to disable unhandled exception capture and the logging integration (#2413)
- Fixed the breadcrumb format for lifecycle events (#2407)
- When targeting iOS, the
WatchdogTerminationIntegrationnow defaults tofalseas to not report false positives. Users can control this through the optionIosWatchdogTerminationIntegrationEnabled(#2403) - The SDK now correctly sets the currently active scene's name on the event (#2400)
- Fixed an issue where screenshot capture triggered on a burst job would crash the game. The SDK can now also capture screenshots on events that occur outside of the main thread (#2392)
- Structured logs now have the
originandsdkattributes correctly set (#2390) - Resolved possible startup crashes on Android VR platforms like the Oculus Quest. The SDK no longer natively subscribes to interaction hooks for automatic tracing and breadcrumb creation. (#2393)
Features
- Strucutured Logs are not longer
experimental(#2401)
Dependencies
4.0.0-beta.4
Breaking Changes
sentry-nativeis now built on Ubuntu 22.04 instead of Ubuntu 20.04, which reached EOL in May 2025. If you are running you game on a server on Ubuntu 20.04, you should update the OS before upgrading to this SDK version. (#2355)
Bump to Sentry SDK for .NET v6.0.0-preview introduces the following changes
BreadcrumbLevel.Criticalhas been renamed toBreadcrumbLevel.Fatalfor consistency with the other Sentry SDKs (#4605)- Removed
SentrySdk.CaptureUserFeedbackand all associated members. Use the newerSentrySdk.CaptureFeedbackinstead. (#4619) - ScopeExtensions.Populate is now internal (#4611)
- Backpressure handling is now enabled by default, meaning that the SDK will monitor system health and reduce the sampling rate of events and transactions when the system is under load. When the system is determined to be healthy again, the sampling rates are returned to their original levels. (#4615)
- Spans and Transactions now implement
IDisposableso that they can be used withusingstatements/declarations that will automatically finish the span with a status of OK when it passes out of scope, if it has not already been finished, to be consistent withActivityclasses when using OpenTelemetry (#4627) - SpanTracer and TransactionTracer are still public but these are now
sealed(see also #4627) - CaptureFeedback now returns a
SentryIdand aCaptureFeedbackResultout parameter that indicate whether feedback was captured successfully and what the reason for failure was otherwise (#4613)
Behavioural Changes
- The SDK no longer refreshes the trace ID when the app loses and regains focus. This means that the trace ID persists from game start to game end. The SDK now also automatically adds breadcrumbs on those lifecycle events. (#2374)
Features
- The SDK no longer ends sessions as crashed when capturing unhandled or logged exceptions. Instead, sessions get correctly marked as
SessionEndStatus.Unhandled(#2376) - Added support for Structured Logging. The
SentrySdk.LoggerAPI is now exposed for Unity users, enabling structured log capture. The SDK can also automatically capture and send Debug logs based on the options configured. (#2368)
Fixes
- When configured, the SDK now no longer treats
Debug.LogErrorevents as exceptions but resports them as message events instead (#2377)
Fixes
- When targeting Xbox, the SDK now correctly picks up the debug symbols for sentry-native from the
Assets/Plugins/Sentrydirectory (#2363)
Dependencies
3.2.4
Fixes
This release contains the bump of the Cocoa SDK with the following note and resolves Invalid architecture errors when submitting to the app store.
Important
Xcode 26 no longer allows individual frameworks to contain arm64e slices anymore if the main binary doesn't contain them.
We have decided to split the Dynamic variant and Sentry-WithoutUIKitOrAppKit of Sentry into two variants:
Sentry-Dynamic: Without ARM64eSentry-Dynamic-WithARM64e: With ARM64e sliceSentry-WithoutUIKitOrAppKit: Without ARM64eSentry-WithoutUIKitOrAppKit-WithARM64e: With ARM64e slice
If your app does not need arm64e, you don't need to make any changes.
But if your app needs arm64e please use Sentry-Dynamic-WithARM64e or Sentry-WithoutUIKitOrAppKit-WithARM64e from 8.55.0 so you don't have issues uploading to the App Store.
Dependencies
4.0.0-beta.3
Breaking Changes
- The SDK will now always add a breadcrumb when capturing an exception. The option to opt-out of this has been removed. (#2335)
- The deprecated Runtime- and BuildTime-Configuration have been removed in favor of the single
OptionsConfigurationscript. When migrating you can make use of preprocessor directives to set specific options for specific platforms. Check out the (Migration Guide). (#2337)
Features
Fixes
- Fixed crashes when adding breadcrumbs on iOS/macOS. This was caused by invalid date parsing and corrupted string data in the native bridge responsible for scope sync (#2327, #2338)
- Fixed input handling in samples to work with old and new input system (#2319)
- The SDK now captures exceptions on WebGL through the logging integration instead of the incompatible log handler, providing better stack trace support . (#2322)
- Fixed input handling in samples to work with old and new input system. (#2319)
Dependencies
4.0.0-beta.2
Breaking Changes
- Removed Unity 2020 support, which reached End of Life in 2023. Minimum supported version now is 2021. (#2313)
Features
- The SDK now has a dedicated sample scene for third party plugins like Cysharp, or DOTween. (#2289)
- The SDK now automatically marks stack frames from
CysharpandDG.Tweeningas non in-app. This highly improves the resulting stack trace quality in the issues details. (#2285)
Fixes
- The SDK no longer accesses
AnalyticsSessionInfo.userIdwhen targeting console platforms. This was leading to crashes during launch. (#2309) - The SDK now deduplicates trace generation during startup and scene loading (#2301)
- The SDK no longer appends multiple upload tasks when building for Android (#2300)
- Fixed false positive ANR events on
WebGL, i.e. when switching tabs, or unfocusing the player (#2306) - The SDK now automatically picks up previously missing debug symbols - i.e.
BurstDebugInformation, by passing the
target directory path to Sentry CLI. Sentry CLI then automatically and recursively picks up any not yet uploaded symbols. (#2298) - The check used to verify whether the current thread is the main-thread now includes
JobsUtility.IsExecutingJobto support running in Burst. (#2226) - For targeting iOS, the Unity SDK now brings an iOS-only
.xcframework, reducing package size. (#2264)
Dependencies
- Bump .NET SDK from v5.12.0 to v5.15.0 (#2259, #2274, #2291, #2315)
- Bump Cocoa SDK from v8.51.0 to v8.54.0 (#2265)
- Bump Java SDK from v8.17.0 to v8.21.1 (#2261, #2280, #2283, #2299, #2308, #2311)
- Bump Native SDK from v0.9.1 to v0.10.1 (#2275, #2303)
- Bump CLI from v2.50.2 to v2.53.0 (#2276, #2288, #2302)
- Bump Cocoa SDK from v8.54.0 to v8.55.1 (#2305)
4.0.0-beta.1
Fixes
- The SDK now waits for 'End of Frame' before capturing a screenshot. This should address any blank or malformed screenshots previously attached to events. The SDK now also only captures one screenshot for the first error event in each individual frame. (#2240)
Dependencies
4.0.0-beta.0
Breaking Changes
-
Removed Unity 2019 support, which reached End of Life in 2022. Minimum supported version now is 2020. (#2231)
-
Breaking Change: The Unity SDK's static API has been moved from
Sentry.Unity.SentryUnityandSentry.SentrySdktoSentry.Unity.SentrySdk. This change enables manual/programatic SDK initialization with full functionality, previously only available through auto-initialization. The underlying .NET SDK'sSentrySdkclass is now internal, and several previously public classes likeSentryInitializationandSentryIntegrationsare now internal.Migration: Update your
usingdirectives fromusing Sentry;tousing Sentry.Unity;. IDEs like Rider can automatically import the missing references. In some cases, you may need bothusing Sentry.Unity;(for the static API) andusing Sentry;(for types likeSentryId). No changes are required to your actual SDK method calls (e.g.,SentrySdk.CaptureException()remains the same). (#2227, #2239)
Features
- The SDK now comes with a
SentryUserFeedbackprefab ready to be used. You can drag and drop it into your scene or
customize it by creating your own variant. The user feedback feature allows your users to provide feedback in form
of a written message that can optionally have a screenshot attached. Read more about it (here). (#2220)