You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 19:41:11 +00:00
Merge pull request #103944 from KoBeWi/more_red_info
Improve error messages for `add_property_info()`
This commit is contained in:
@@ -1221,8 +1221,12 @@ Variant _GLOBAL_DEF(const PropertyInfo &p_info, const Variant &p_default, bool p
|
||||
}
|
||||
|
||||
void ProjectSettings::_add_property_info_bind(const Dictionary &p_info) {
|
||||
ERR_FAIL_COND(!p_info.has("name"));
|
||||
ERR_FAIL_COND(!p_info.has("type"));
|
||||
ERR_FAIL_COND_MSG(!p_info.has("name"), "Property info is missing \"name\" field.");
|
||||
ERR_FAIL_COND_MSG(!p_info.has("type"), "Property info is missing \"type\" field.");
|
||||
|
||||
if (p_info.has("usage")) {
|
||||
WARN_PRINT("\"usage\" is not supported in add_property_info().");
|
||||
}
|
||||
|
||||
PropertyInfo pinfo;
|
||||
pinfo.name = p_info["name"];
|
||||
|
||||
Reference in New Issue
Block a user