-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Node.GetChildren should return an array of Node, not Object in C#. #18773
Comments
I wonder if we could create a type safe Array template class that wrapped Array. It would only wrap it, pretty much the same as the generic Array in #15880 does. |
I must add that once #15880 goes through, you will be able to do |
Is this still relevant in the current master branch? |
Seems to be so, albeit in a slightly different form: public Godot.Collections.Array GetChildren() |
In 4.0 alpha 1, the C++ method is: TypedArray<Node> Node::_get_children(bool p_include_internal) const; This seems to be what would be needed to solve this issue. Is it handled properly on the Mono side too or does it still require dedicated development work? @godotengine/mono |
This is still not solved. The I don't think this can be fixed by the mono module since ClassDB does not give us enough information, currently the {
"name": "get_children",
"is_const": true,
"is_vararg": false,
"is_virtual": false,
"hash": 172413545,
"return_value": {
"type": "Array"
},
"arguments": [
{
"name": "include_internal",
"type": "bool",
"default_value": "false"
}
]
} Related: #26029 |
Issue description:
Right now, it returns an
object[]
(it'd be anArray<object>
if #15880 went through), which isn't amazing because the objects are alwaysNode
sYes, this would require some changes to the binding generator.
The text was updated successfully, but these errors were encountered: