From 81693e91147424858df2c1965aef2f410691e9c0 Mon Sep 17 00:00:00 2001 From: Patrick Dawson Date: Thu, 16 May 2024 20:49:58 +0100 Subject: [PATCH] Fix ToolInit --- gdext/src/ImGuiGD.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gdext/src/ImGuiGD.cpp b/gdext/src/ImGuiGD.cpp index bf5e715..09615e9 100644 --- a/gdext/src/ImGuiGD.cpp +++ b/gdext/src/ImGuiGD.cpp @@ -51,11 +51,9 @@ bool ImGuiGD::ToolInit() Node* plugin = Object::cast_to(Engine::get_singleton()->get_singleton("ImGuiPlugin")); ERR_FAIL_COND_V(!plugin, false); - if (!plugin->get_node_or_null("ImGuiLayer")) + if (!plugin->get_node_or_null("ImGuiController")) { - ImGuiLayer* igl = memnew(ImGuiLayer); - plugin->add_child(igl); - igl->set_visible(true); + plugin->add_child(memnew(ImGuiController)); } return true; #else