You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/platforms/unity/native-support/index.mdx
+24-8Lines changed: 24 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -14,25 +14,41 @@ The setup for the iOS and Android native SDKs happens during build time, with th
14
14
15
15
</Note>
16
16
17
-
## Android
17
+
## Mobile
18
+
19
+
The native crash support for Android and iOS is achieved by modifying the generated platform-specific projects during build time. That way, the Sentry native crash support gets initialized before Unity, making it possible to capture errors of the Unity engine itself.
20
+
21
+
### Android
18
22
19
23
When chosing 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.
20
24
21
-
## iOS
25
+
###iOS
22
26
23
27
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.
24
28
25
29
The [iOS SDK](/platforms/apple/guides/ios/) supports capturing Objective-C exceptions which are disabled in the generated Xcode project by default. Consider enabling them in the "Build Settings" tab by setting `GCC_ENABLE_OBJC_EXCEPTIONS` to true.
26
30
27
-
## Windows
31
+
## Desktop
32
+
33
+
The native support is configured and enabled as early as possible by the C# layer, right after the Unity engine starts. This is slightly different from on mobile where we inject native initialization code that runs before the Unity engine runs.
34
+
35
+
### Windows
36
+
37
+
On Windows, the Unity SDK includes the [Native SDK](/platforms/native/) with the crashpad backend. Windows native crashes are automatically captured through minidumps. To upload these to Sentry, the SDK copies the `crashpad_handler.exe` to the build output directory at the end of the build process. This executable must be included when shipping your game.
38
+
39
+
### macOS
40
+
41
+
The Native Support on macOS relies on the [macOS SDK](/platforms/apple/guides/macos/). Stackwalking happens in process.
42
+
43
+
### Linux
28
44
29
-
Windows native crashes are automatically captured through minidumps. The Native Support is configured and enabled as early as possible by the C# layer, right after the Unity engine starts. This is slightly different than the Android and iOS support where we inject native initialization code that runs before Unity engine runs.
45
+
On Linux the Unity SDK includes the [Native SDK](/platforms/native/) with the breakpad backend. A minidump is created in process and no handler executable is required.
30
46
31
47
## Debug Symbols
32
48
33
-
Sentry requires [debug information files](/platforms/android/data-management/debug-files/) to symbolicate your crash logs. The Unity SDK provides an automated upload functionality for those symbol files that rely on the [sentry-cli](/product/cli/). We've included the executables for Windows, macOS, and Linux inside the Unity SDK package.
49
+
Sentry requires [debug information files](/platforms/unity/data-management/debug-files/) to symbolicate your crashes. The Unity SDK provides an automated upload functionality for those symbol files that rely on the [sentry-cli](/product/cli/). This is done transparently so you're not required to run `sentry-cli` manually. The symbol upload happens during Unity build in the editor. We've included the executables for Windows, macOS, and Linux as part of the Unity SDK package.
34
50
35
-
The automated debug symbols upload is enabled by default but requires configuration. Go to **Tools > Sentry > Editor** to enter the [Auth Token](https://sentry.io/api/), Org Slug, and the Project Name. Note that the Unity SDK creates a file at `Assets/Plugins/Sentry/SentryCliOptions.asset` to store the configuration, that should not be made publicly available.
51
+
The automated debug symbols upload is enabled by default but requires configuration. Go to **Tools > Sentry > Editor** to enter the [Auth Token](https://sentry.io/api/), Organization Slug, and the Project Name. Note that the Unity SDK creates a file at `Assets/Plugins/Sentry/SentryCliOptions.asset` to store the configuration, that should **not** be made publicly available.
36
52
37
53
### iOS - dSYM and Bitcode
38
54
@@ -42,13 +58,13 @@ For Sentry to symbolicate your crash logs and with `bitcode` enabled, we need tw
42
58
1.`dSYM` files available only **after** App Store Connect finishes processing the build
43
59
2.`BCSymbolMap` files that are created during the archiving process
44
60
45
-
The automated symbol upload will take care of the `BCSymbolMap` files by processing them during the archiving process. To provide the dSYM files to Sentry, you can either set up the [App Store Connect Integration](/platforms/apple/guides/ios/dsym/#bitcode-appstore) so Sentry can fetch them for you or download and then upload them [manually using sentry-cli](/platforms/apple/guides/ios/dsym/#bitcode-sentrycli).
61
+
The automated symbol upload will take care of the `BCSymbolMap` files by processing them during the archiving process. To provide the dSYM files to Sentry, you can either set up the [Sentry App Store Connect Integration](/platforms/apple/guides/ios/dsym/#bitcode-appstore) so Sentry can fetch them for you, or download them from Apple and then upload them [manually using sentry-cli](/platforms/apple/guides/ios/dsym/#bitcode-sentrycli).
46
62
47
63
With `bitcode` disabled, the automated symbols upload will pick up the `dSYM` files at the end of the build process without further action required.
48
64
49
65
### Manual Upload Using sentry-cli
50
66
51
-
You can either use the provided executables from within the package or follow the [sentry-cli documentation](/product/cli/installation/) to make it available globally. To upload debug symbols, run it with:
67
+
If you don't want to rely on the automated symbol upload, you can run `sentry-cli` through the commandline. For that, you can use the provided executables from within the package or follow the [sentry-cli documentation](/product/cli/installation/) to make it available globally. To upload debug symbols, run it with:
0 commit comments