Fix Make Unique for built-in scripts
This commit is contained in:
@@ -1879,7 +1879,7 @@ void EditorNode::gather_resources(const Variant &p_variant, List<Ref<Resource>>
|
||||
p_variant.get_property_list(&pinfo);
|
||||
|
||||
for (const PropertyInfo &E : pinfo) {
|
||||
if (!(E.usage & PROPERTY_USAGE_EDITOR) || E.name == "script") {
|
||||
if (!(E.usage & PROPERTY_USAGE_EDITOR)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ void EditorResourcePicker::_update_resource() {
|
||||
bool is_internal = EditorNode::get_singleton()->is_resource_internal_to_scene(edited_resource);
|
||||
int num_of_copies = EditorNode::get_singleton()->get_resource_count(edited_resource);
|
||||
make_unique_button->set_button_icon(get_editor_theme_icon(SNAME("Instance")));
|
||||
make_unique_button->set_visible((num_of_copies > 1 || !is_internal) && !Object::cast_to<Script>(edited_resource.ptr()));
|
||||
make_unique_button->set_visible(num_of_copies > 1 || (!is_internal && !Object::cast_to<Script>(edited_resource.ptr())));
|
||||
make_unique_button->set_disabled((!unique_enable && !unique_recursive_enabled) || !editable);
|
||||
|
||||
String tooltip;
|
||||
|
||||
Reference in New Issue
Block a user