Skip to content

Commit

Permalink
Fix unexpected editor dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
KoBeWi authored and rohanrhu committed Dec 28, 2022
1 parent 8eff63c commit 78303d5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scene/debugger/scene_debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 78303d5

Please sign in to comment.