From 1df0159b362493f280103de8085634c9c6d72f2e Mon Sep 17 00:00:00 2001 From: Raffaele Picca Date: Mon, 16 Sep 2024 14:11:15 +0200 Subject: [PATCH] Added a more detailed error message when instatiating a scene with missing export properties. --- scene/resources/packed_scene.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 69dc71e4149..d6fe4385c47 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -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");