1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Added a more detailed error message when instatiating a scene with missing export properties.

This commit is contained in:
Raffaele Picca
2024-09-16 14:11:15 +02:00
parent 6daa6a8513
commit 1df0159b36

View File

@@ -527,7 +527,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
bool valid;
Array array = dnp.base->get(dnp.property, &valid);
ERR_CONTINUE(!valid);
ERR_CONTINUE_EDMSG(!valid, vformat("Failed to get property '%s' from node '%s'.", dnp.property, dnp.base->get_name()));
array = array.duplicate();
array.resize(paths.size());
@@ -540,7 +540,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
bool valid;
Dictionary dict = dnp.base->get(dnp.property, &valid);
ERR_CONTINUE(!valid);
ERR_CONTINUE_EDMSG(!valid, vformat("Failed to get property '%s' from node '%s'.", dnp.property, dnp.base->get_name()));
dict = dict.duplicate();
bool convert_key = dict.get_typed_key_builtin() == Variant::OBJECT &&
ClassDB::is_parent_class(dict.get_typed_key_class_name(), "Node");