mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Push Loggers earlyer to hopefully avoid race condition
+ Fix null check in EditorLogger
This commit is contained in:
@@ -11,10 +11,10 @@ namespace GlitchyEditor
|
|||||||
|
|
||||||
public this(String[] args)
|
public this(String[] args)
|
||||||
{
|
{
|
||||||
PushLayer(new EditorLayer(args, _contentManager));
|
|
||||||
|
|
||||||
Log.ClientLogger = new EditorLogger();
|
Log.ClientLogger = new EditorLogger();
|
||||||
Log.EngineLogger = new EditorLogger() { IsEngineLogger = true };
|
Log.EngineLogger = new EditorLogger() { IsEngineLogger = true };
|
||||||
|
|
||||||
|
PushLayer(new EditorLayer(args, _contentManager));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IContentManager InitContentManager()
|
protected override IContentManager InitContentManager()
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public class EditorLogger : Logger
|
|||||||
|
|
||||||
Debug.Write($"[{timestamp:HH:mm:ss.fff}] ({_name})|{level.UpperString}: {message}\n");
|
Debug.Write($"[{timestamp:HH:mm:ss.fff}] ({_name})|{level.UpperString}: {message}\n");
|
||||||
|
|
||||||
if (Editor.Instance == null)
|
if (Editor.Instance?.LogWindow == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (args.Count > 0 && (var ex = args[^1] as MonoExceptionHelper))
|
if (args.Count > 0 && (var ex = args[^1] as MonoExceptionHelper))
|
||||||
|
|||||||
Reference in New Issue
Block a user