mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Added EngineResult glue type, some cleanup
This commit is contained in:
@@ -463,6 +463,8 @@ namespace GlitchyEditor.EditWindows
|
||||
ImGui.PopStyleVar(1);
|
||||
}
|
||||
|
||||
private bool _showEntityIds = true;
|
||||
|
||||
/// Shows the given entity and it's children as a tree.
|
||||
private void ImGuiPrintEntityTree(TreeNode<Entity> tree, bool flat = false)
|
||||
{
|
||||
@@ -484,13 +486,17 @@ namespace GlitchyEditor.EditWindows
|
||||
|
||||
var nameComponent = entity.GetComponent<NameComponent>();
|
||||
|
||||
if(nameComponent != null)
|
||||
if (_showEntityIds)
|
||||
{
|
||||
name = scope:: $"{nameComponent?.Name ?? ("Entity")} ({(entity.UUID)})";
|
||||
}
|
||||
else if(nameComponent != null)
|
||||
{
|
||||
name = scope:: .(nameComponent.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
name = scope:: $"Entity {(entity.Handle.[Friend]Index)}";
|
||||
name = scope:: $"Entity {(entity.UUID)}";
|
||||
}
|
||||
|
||||
ImGui.TreeNodeFlags flags = .OpenOnArrow | .DefaultOpen | .SpanAllColumns | .OpenOnDoubleClick;
|
||||
|
||||
@@ -45,7 +45,7 @@ class MessageSource
|
||||
/// If true, the message is only meant for engine developers... so only me :(
|
||||
public bool IsEngineMessage = false;
|
||||
|
||||
public ScriptException Exception = null ~ _?.ReleaseRef();
|
||||
public ScriptException Exception = null ~ delete _;
|
||||
|
||||
public String AdditionalData = null ~ delete _;
|
||||
}
|
||||
@@ -383,7 +383,7 @@ class LogWindow : EditorWindow
|
||||
message.AppendF($"Exception: \"{exception.FullName}\" | Message: \"{exception.Message}\" {firstLine}\0");
|
||||
|
||||
// TODO: are mono exceptions never engine only?
|
||||
LogMessage logMessage = new LogMessage(timestamp, message, .Error, new MessageSource(){Entity = exception.EntityId, Exception = exception..AddRef(), IsEngineMessage = false});
|
||||
LogMessage logMessage = new LogMessage(timestamp, message, .Error, new MessageSource(){Entity = exception.EntityId, Exception = exception, IsEngineMessage = false});
|
||||
_messages.Add(logMessage);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user