浏览代码

Merge pull request #22342 from DualMatrix/duplicate_no_fun

Fixed duplicating nodes not attaching script in-game with Sync Scene Changes enabled
Rémi Verschelde 7 年之前
父节点
当前提交
81d713e5c2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/main/scene_tree.cpp

+ 1 - 1
scene/main/scene_tree.cpp

@@ -1602,7 +1602,7 @@ void SceneTree::_live_edit_duplicate_node_func(const NodePath &p_at, const Strin
 			continue;
 		Node *n2 = n->get_node(p_at);
 
-		Node *dup = n2->duplicate(true);
+		Node *dup = n2->duplicate(Node::DUPLICATE_SIGNALS | Node::DUPLICATE_GROUPS | Node::DUPLICATE_SCRIPTS);
 
 		if (!dup)
 			continue;