summaryrefslogtreecommitdiff
path: root/scene/debugger
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-12-06 13:49:42 +0100
committerkobewi <kobewi4e@gmail.com>2022-12-06 14:47:25 +0100
commit368b209cc3fd8ea60c3c62903fa43ec73ff08f57 (patch)
tree696bf317c5a589517e2f3993b328861e0546abeb /scene/debugger
parent43e9ca40ff9a87655249e372654e2d30223363f7 (diff)
Fix unexpected editor dependency
Diffstat (limited to 'scene/debugger')
-rw-r--r--scene/debugger/scene_debugger.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp
index 35ba49563c..28eedcbe13 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<Node>(ObjectDB::get_instance(id));
ERR_FAIL_COND(!node);
+#ifdef TOOLS_ENABLED
HashMap<const Node *, Node *> 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++) {