Browse Source

better unique name resolution, as suggested i #3017

Juan Linietsky 9 năm trước cách đây
mục cha
commit
ecad3a285f
1 tập tin đã thay đổi với 1 bổ sung5 xóa
  1. 1 5
      scene/main/node.cpp

+ 1 - 5
scene/main/node.cpp

@@ -700,11 +700,7 @@ void Node::_validate_child_name(Node *p_child, bool p_force_human_readable) {
 		if (!unique) {
 
 			node_hrcr_count.ref();
-#ifdef DEBUG_ENABLED
-			String name = "@"+String(p_child->get_type_name())+itos(node_hrcr_count.get());
-#else
-			String name = "@"+itos(node_hrcr_count.get());
-#endif
+			String name = "@"+String(p_child->get_name())+"@"+itos(node_hrcr_count.get());
 			p_child->data.name=name;
 		}
 	}