Merge pull request #57808 from KoBeWi/named_inspector

This commit is contained in:
Rémi Verschelde 2022-02-08 17:32:14 +01:00 committed by GitHub
commit 6889085813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -3479,10 +3479,14 @@ void EditorInspector::_update_script_class_properties(const Object &p_object, Li
String path = s->get_path();
String name = EditorNode::get_editor_data().script_class_get_name(path);
if (name.is_empty()) {
if (!s->is_built_in()) {
name = path.get_file();
if (s->is_built_in()) {
if (s->get_name().is_empty()) {
name = TTR("Built-in script");
} else {
name = vformat("%s (%s)", s->get_name(), TTR("Built-in"));
}
} else {
name = TTR("Built-in script");
name = path.get_file();
}
}