From 368b209cc3fd8ea60c3c62903fa43ec73ff08f57 Mon Sep 17 00:00:00 2001 From: kobewi Date: Tue, 6 Dec 2022 13:49:42 +0100 Subject: [PATCH] Fix unexpected editor dependency --- scene/debugger/scene_debugger.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp index 35ba49563cc..28eedcbe13d 100644 --- a/scene/debugger/scene_debugger.cpp +++ b/scene/debugger/scene_debugger.cpp @@ -220,8 +220,12 @@ void SceneDebugger::_save_node(ObjectID id, const String &p_path) { Node *node = Object::cast_to(ObjectDB::get_instance(id)); ERR_FAIL_COND(!node); +#ifdef TOOLS_ENABLED HashMap duplimap; Node *copy = node->duplicate_from_editor(duplimap); +#else + Node *copy = node->duplicate(); +#endif // Handle Unique Nodes. for (int i = 0; i < copy->get_child_count(false); i++) {