浏览代码

Merge pull request #15863 from touilleMan/fix-pluginscript-crash-in-dialog-box

Hide Script nodes in dialog box to prevent crash with pluginscript
Rémi Verschelde 7 年之前
父节点
当前提交
a15f60d212
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      editor/create_dialog.cpp

+ 3 - 0
editor/create_dialog.cpp

@@ -255,6 +255,9 @@ void CreateDialog::_update_search() {
 		if (base_type == "Node" && type.begins_with("Editor"))
 		if (base_type == "Node" && type.begins_with("Editor"))
 			continue; // do not show editor nodes
 			continue; // do not show editor nodes
 
 
+		if (base_type == "Resource" && ClassDB::is_parent_class(type, "Script"))
+			continue; // do not show script nodes
+
 		if (!ClassDB::can_instance(type))
 		if (!ClassDB::can_instance(type))
 			continue; // can't create what can't be instanced
 			continue; // can't create what can't be instanced