You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
Don't allow adding Objects to the project settings
Godot doesn't support serializing objects. This closes #33667.
This commit is contained in:
@@ -381,9 +381,12 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
|
|||||||
type->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
|
type->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
|
||||||
hbc->add_child(type);
|
hbc->add_child(type);
|
||||||
|
|
||||||
// Start at 1 to avoid adding "Nil" as an option
|
for (int i = 0; i < Variant::VARIANT_MAX; i++) {
|
||||||
for (int i = 1; i < Variant::VARIANT_MAX; i++) {
|
// There's no point in adding Nil types, and Object types
|
||||||
type->add_item(Variant::get_type_name(Variant::Type(i)));
|
// can't be serialized correctly in the project settings.
|
||||||
|
if (i != Variant::NIL && i != Variant::OBJECT) {
|
||||||
|
type->add_item(Variant::get_type_name(Variant::Type(i)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
l = memnew(Label);
|
l = memnew(Label);
|
||||||
|
|||||||
Reference in New Issue
Block a user