Skip to content

Commit c5d6015

Browse files
authored
fix(Unity): ANR limitations (#13672)
1 parent 0ec4390 commit c5d6015

File tree

1 file changed

+9
-1
lines changed
  • docs/platforms/unity/configuration/app-not-responding

1 file changed

+9
-1
lines changed

docs/platforms/unity/configuration/app-not-responding/index.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@ Application Not Responding (ANR) errors are triggered when the Unity thread of t
88

99
## ANR Implementation Details
1010

11-
The ANR detection in the Unity SDK strictly works within the Unity game, ireespecitve of the targeted platform and works in two parts. First the SDK starts a coroutine that periodically notes the time it last got called. Second, a background thread checks the time since the last update against the ANR threshold from the options.
11+
The ANR detection in the Unity SDK strictly works within the Unity game, irrespective of the targeted platform and works in two parts. First the SDK starts a coroutine that periodically notes the time it last got called. Second, a background thread checks the time since the last update against the ANR threshold from the options.
1212
The detection is sensitive of the app losing and regaining focus and gets paused accordingly. It is also using `WaitForSecondsRealtime` so pausing your game by modifying the `Time.timeScale` will not trigger false ANR reports.
1313

1414
On platforms that do no support multithreading the ANR detection falls back to relying on the coroutine itself to report if the last time it executed exceeds the timeout.
1515

16+
### Stack Trace Support
17+
18+
Since the ANR integration creates an exception on a background thread, based on a coroutine not resetting in time, the stack trace will not show the main thread's stack trace.
19+
20+
### Line Number Support
21+
22+
Since the Unity SDKs [line number support](/platforms/unity/configuration/il2cpp) is limited to actually thrown exceptions, the integration does not provide you with line numbers in the captured ANR issues.
23+
1624
## Configuration
1725

1826
ANR detection is enabled by default in Sentry, but you can opt-out through the editor window by going to `Tools -> Sentry -> Advanced -> ANR Detection`. You can also set the ANR timeout there.

0 commit comments

Comments
 (0)