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:
commit
8a7555a1f3
1 changed files with 2 additions and 2 deletions
|
@ -527,7 +527,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
|
||||||
|
|
||||||
bool valid;
|
bool valid;
|
||||||
Array array = dnp.base->get(dnp.property, &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 = array.duplicate();
|
||||||
|
|
||||||
array.resize(paths.size());
|
array.resize(paths.size());
|
||||||
|
@ -540,7 +540,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
|
||||||
|
|
||||||
bool valid;
|
bool valid;
|
||||||
Dictionary dict = dnp.base->get(dnp.property, &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();
|
dict = dict.duplicate();
|
||||||
bool convert_key = dict.get_typed_key_builtin() == Variant::OBJECT &&
|
bool convert_key = dict.get_typed_key_builtin() == Variant::OBJECT &&
|
||||||
ClassDB::is_parent_class(dict.get_typed_key_class_name(), "Node");
|
ClassDB::is_parent_class(dict.get_typed_key_class_name(), "Node");
|
||||||
|
|
Loading…
Reference in a new issue