Fix Debug Log stack trace collecting in Editor

Fixes #51
This commit is contained in:
Wojtek Figat
2021-02-26 12:49:33 +01:00
parent 13cc6eb7b9
commit e1387e92a3
3 changed files with 30 additions and 11 deletions

View File

@@ -36,13 +36,14 @@ namespace FlaxEngine
/// <inheritdoc />
public void Log(LogType logType, Object context, string message)
{
#if DEBUG
string stackTrace = Environment.StackTrace;
if (message == null)
return;
#if BUILD_RELEASE
string stackTrace = null;
#else
string stackTrace = string.Empty;
string stackTrace = Environment.StackTrace;
#endif
Internal_Log(logType, message, Object.GetUnmanagedPtr(context), stackTrace);
SendLog?.Invoke(logType, message, context, stackTrace);
}