-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect property types in extension_api.json #63066
Comments
While auto-completion for GDScript shows options described in part 2, this code:
results in error |
Those properties seem to all be using the godot/core/object/class_db.cpp Lines 872 to 882 in ae5668f
Those methods create a Then, godot/core/extension/extension_api_dump.cpp Lines 41 to 68 in ae5668f
And ends up returning when When the property usage is set to I guess we need to add a check for diff --git a/core/extension/extension_api_dump.cpp b/core/extension/extension_api_dump.cpp
index d5c49b01e9..fb07103a4c 100644
--- a/core/extension/extension_api_dump.cpp
+++ b/core/extension/extension_api_dump.cpp
@@ -49,6 +49,9 @@ static String get_type_name(const PropertyInfo &p_info) {
if (p_info.type == Variant::INT && (p_info.usage & (PROPERTY_USAGE_CLASS_IS_ENUM | PROPERTY_USAGE_CLASS_IS_BITFIELD))) {
return String("enum::") + String(p_info.class_name);
}
+ if (p_info.type == Variant::INT && (p_info.usage & PROPERTY_USAGE_ARRAY)) {
+ return "int";
+ }
if (p_info.class_name != StringName()) {
return p_info.class_name;
}
But I don't know if this is entirely correct. |
Godot version
4.0.alpha12
System information
Windows 10
Issue description
Information about properties of classes in
extension_api.json
appears to be incorrect in some cases.There are cases where int turns into list of two elements:
And there are also a few of a different type. This ones are not documented, but can be accessed through GDScript.
Getters and setters are also empty strings for them.
Steps to reproduce
extension_api.json
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: