Better error message when failed to read editor setting

This commit is contained in:
Serhii Snitsaruk 2024-08-18 12:41:16 +02:00
parent f232069dc4
commit f550ddd23f
No known key found for this signature in database
GPG Key ID: A965EF8799FFEC2D
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ using namespace godot;
Variant _EDITOR_GET(const String &p_setting) { Variant _EDITOR_GET(const String &p_setting) {
Ref<EditorSettings> es = EditorInterface::get_singleton()->get_editor_settings(); Ref<EditorSettings> es = EditorInterface::get_singleton()->get_editor_settings();
ERR_FAIL_COND_V(es.is_null() || !es->has_setting(p_setting), Variant()); ERR_FAIL_COND_V_MSG(es.is_null() || !es->has_setting(p_setting), Variant(), "Couldn't get editor setting: " + p_setting);
return es->get(p_setting); return es->get(p_setting);
} }