private static void _RegisterExceptionHandler() { try { Application.RegisterLogCallback(new Application.LogCallback(BuglyAgent._OnLogCallbackHandler)); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(BuglyAgent._OnUncaughtExceptionHandler); BuglyAgent._isInitialized = true; BuglyAgent.DebugLog(null, "Register the log callback in Unity {0}", new object[] { Application.unityVersion }); } catch { } BuglyAgent.SetUnityVersion(); }
private static void _RegisterExceptionHandler() { try { Application.add_logMessageReceived(new Application.LogCallback(BuglyAgent._OnLogCallbackHandler)); AppDomain.get_CurrentDomain().add_UnhandledException(new UnhandledExceptionEventHandler(BuglyAgent._OnUncaughtExceptionHandler)); BuglyAgent._isInitialized = true; BuglyAgent.DebugLog(null, "Register the log callback in Unity {0}", new object[] { Application.get_unityVersion() }); } catch { } BuglyAgent.SetUnityVersion(); }