We are using Crashlytics with our game, and would like to log all exceptions that are thrown by Unity.
To get an event for all the exceptions thrown, we are using:
Application.logMessageReceived += HandleLog;
void HandleLog(string msg, string stackTrace, LogType type) {
...
}
The problem is, that the Firebase SDK was changed, and now they expect an Exception object to be passed to their call:
void LogException (Exception exception)
What is the best way to create the exception in such a way that the stack trace will be logged correctly?
I have seem several reflection based solutions, but has anyone used something that works with Crashlytics?
I actually find it very weird that they do not have a straight forward solution for this… am I missing something here?