Skip to content

Commit 5b0381f

Browse files
committed
Add support for Unity 5.0 Application.logMessageReceived for exception
log messages.
1 parent a99d8de commit 5b0381f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

source/Plugins/GoogleAnalyticsV3/GoogleAnalyticsV3.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@ void Awake() {
118118
}
119119

120120
if (UncaughtExceptionReporting) {
121-
Application.RegisterLogCallback(HandleException);
121+
#if UNITY_5_0
122+
Application.logMessageReceived += HandleException;
123+
#else
124+
Application.RegisterLogCallback (HandleException);
125+
#endif
122126
if (GoogleAnalyticsV3.belowThreshold(logLevel, GoogleAnalyticsV3.DebugMode.VERBOSE)) {
123127
Debug.Log("Enabling uncaught exception reporting.");
124128
}

0 commit comments

Comments
 (0)