Skip to content

Commit 063d083

Browse files
bitsandfoxesmarandanetobruno-garciaimatwawana
authored
feat(unity): IL2CPP (#5337)
Co-authored-by: Manoel Aranda Neto <[email protected]> Co-authored-by: Bruno Garcia <[email protected]> Co-authored-by: Isabel <[email protected]>
1 parent 36d918c commit 063d083

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: IL2CPP Line Numbers
3+
description: "Learn how the SDK provides line numbers to issues from IL2CPP builds."
4+
sidebar_order: 10
5+
---
6+
7+
<Note>
8+
9+
IL2CPP line number support is available in Beta and requires version 0.22.0 or later of the Sentry SDK for Unity. Beta features are still in-progress and may have bugs. We recognize the irony.
10+
11+
</Note>
12+
13+
<Note>
14+
15+
IL2CPP line number support relies on the debug symbol upload to function properly. With the automated debug symbol upload enabled, the Sentry SDK will upload the line mapping through Sentry CLI.
16+
17+
The feature is available from Unity versions `2020.3` and `2021.3` onwards. We are running tests in CI against the current LTS, starting from `2020.3.37f1` and `2021.3.6f1`.
18+
19+
</Note>
20+
21+
Unity provides you the option to select [IL2CPP](https://docs.unity3d.com/Manual/IL2CPP.html) as your scripting backend. This leads to C++ code being generated from your compiled C# (IL) code, hence the name `IL to CPP`.
22+
23+
The Sentry SDK provides line number support for IL2CPP builds for the following platforms:
24+
25+
- Windows (*currently limited to Unity 2021.3 or newer)
26+
- macOS
27+
- Linux
28+
- Android
29+
- iOS
30+
31+
When you build with IL2CPP, errors in your game will happen in the native code. Also, the mapping between your C# code and the generated C++ code is part of the build process and isn't shipped with your game. That means the event the Sentry SDK reports can only contain the native stack trace. To provide you with C# line numbers, the Sentry server needs to have access to that line mapping through [Debug Information Files](https://docs.sentry.io/platforms/unity/data-management/debug-files/).
32+
33+
You can opt in to this feature through the editor configuration window by selecting `Tools -> Sentry -> Advanced -> IL2CPP line numbers` or [programmatically](/platforms/unity/configuration/options/#programmatic-configuration).
34+
35+
```csharp
36+
options.Il2CppLineNumberSupportEnabled = true;
37+
```

0 commit comments

Comments
 (0)