Merge pull request #97071 from RPicster/master

Add a more detailed error message when instantiating a scene with missing export properties
This commit is contained in:
Rémi Verschelde 2024-09-17 09:18:05 +02:00
commit 8a7555a1f3
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 2 deletions

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");