Hey! I'm trying to upload the full player log whenever my game crashes (Unity SDK)
SentrySdk.ConfigureScope(scope =>
{
string logFilePath = Path.Combine(
#if UNITY_EDITOR
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "/Unity/Editor/Editor.log"
#else
Application.persistentDataPath + "/../Player.log"
#endif
);
if (File.Exists(logFilePath)) {
scope.AddAttachment(logFilePath);
}
});
I have this running on start, and I can see the log being attached if the error isn't fatal, but if it is, all I get is a ApplicationNotRespondingException with no log attached.
Is there a better way to do this, or am I missing something?
Let me know, thanks!