Godot Version
Godot v4.2.1 .NET 8
Question
A have a custom Editor Window, that i want to show some runtime debug information
So I have the EditorPlugin
class and the window’s class
#if TOOLS
using Godot;
namespace Entitas.Generic.Editor;
[Tool]
public partial class VisualDebuggerLoader : EditorPlugin
{
private Control _root;
public override void _EnterTree()
{
_root = new VisualDebuggerWindow();
_root.Name = nameof(VisualDebuggerWindow);
AddControlToDock(DockSlot.LeftUr, _root);
}
public override void _ExitTree()
{
RemoveControlFromDocks(_root);
_root.QueueFree();
}
}
#endif
#if DEBUG || DEVELOPMENT_BUILD
using Godot;
namespace Entitas.Generic.Editor;
#if TOOLS
[Tool]
#endif
public partial class VisualDebuggerWindow : Control
{
private Label _label;
public override void _Ready()
{
_label = new Label();
AddChild(_label);
}
public override void _Process(double delta)
{
var isRemoteTreeRunning = TODO;
_label.Text = isRemoteTreeRunning
? "The project isn't running"
: "The remote tree is live!";
}
}
#endif
But there is the question: How to check if the Game is actually running?
Engine.EditorHint
doesn’t work in my case, because, as i understand, the code of the VisualDebuggerWindow
is always running in the editor
I need something like Remote in Scene Dock but I couldn’t find anything>_<
Thanks in advance!