From 2dca2cc9866917b58b597fd20e3534d723cd8418 Mon Sep 17 00:00:00 2001 From: Bruno Garcia Date: Thu, 7 Nov 2024 10:24:36 -0500 Subject: [PATCH] unity: android crash handler --- docs/platforms/unity/native-support/index.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/platforms/unity/native-support/index.mdx b/docs/platforms/unity/native-support/index.mdx index 57badc5d74b2c..38aa8d4534937 100644 --- a/docs/platforms/unity/native-support/index.mdx +++ b/docs/platforms/unity/native-support/index.mdx @@ -26,6 +26,9 @@ The native crash support for Android and iOS is achieved by modifying the genera When choosing Android as a build target, Unity creates a Gradle project. During the Unity build process, the SDK embeds the [Android SDK](/platforms/android/), as well as the provided options, by adding it to the generated project's Android Manifest. +Note that [Unity has an Android crash handler which takes treats the crash information as a string](https://docs.unity3d.com/6000.0/Documentation/Manual/android-handle-crashes.html). This doesn't allow Sentry to symbolicate the crash and in result becomes a very low quality crash dump. +We recomment disalbing that through: `-androidChainedSignalHandlerBehavior:disabled`. For more information, [read the Unity documentation on this topic](https://docs.unity3d.com/6000.0/Documentation/Manual/android-handle-crashes.html). + ### iOS When building your game for iOS, Unity exports it as an Xcode project. By modifying that generated project, the SDK adds the [iOS SDK](/platforms/apple/guides/ios/) to provide native support. It adds the initialization code to the `main.m` and generates the options provided by the editor configuration window as `SentryOptions.m`. The SDK also copies the `SentryNativeBridge` that enables the C# layer to communicate with the iOS SDK. This means that there's no need to use the Unity [built-in crash reporting](https://docs.unity3d.com/ScriptReference/CrashReport.html) functionality.