We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I reproduced the error in this forum issue : https://godotforums.org/d/31691-how-to-bind-a-function-with-a-node-as-parameter
Methods using a Node as parameter works in Godot internal modules, but not when using godot-cpp in a GDExtension.
Node
godot-cpp
void MyClass::my_func(godot::Node *p_node) { // ... } void MyClass::_bind_methods() { godot::ClassDB::bind_method(godot::D_METHOD("my_func", "node"), &MyClass::my_func); }
Outputs following Templates errors:
godot-cpp\include\godot_cpp/core/binder_common.hpp(89): error C2440: 'return': cannot convert from 'const godot::Variant' to 'T' with [ T=godot::Node * ]
I can't figure how internal modules obtain this casting behaviour, any ideas ?
The text was updated successfully, but these errors were encountered:
Probably this PR can help #950
Sorry, something went wrong.
The latest version does not seem to have this problem anymore.
No branches or pull requests
I reproduced the error in this forum issue : https://godotforums.org/d/31691-how-to-bind-a-function-with-a-node-as-parameter
Methods using a
Node
as parameter works in Godot internal modules, but not when usinggodot-cpp
in a GDExtension.Outputs following Templates errors:
I can't figure how internal modules obtain this casting behaviour, any ideas ?
The text was updated successfully, but these errors were encountered: