Skip to content

Commit

Permalink
Added a more detailed error message when instatiating a scene with mi…
Browse files Browse the repository at this point in the history
…ssing export properties.
  • Loading branch information
RPicster committed Sep 16, 2024
1 parent 6daa6a8 commit 1df0159
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scene/resources/packed_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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");
Expand Down

0 comments on commit 1df0159

Please sign in to comment.