godotengine / godotengine/godot-docs
Missing example to connect signal in GDNative C++ code
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
I've read and replicated the example described in [gdnative-cpp-example.rst](https://github.com/godotengine/godot-docs/blob/master/tutorials/plugins/gdnative/gdnative-cpp-example.rst#signals) but I can't successfully connect a function to a signal in C++ source code. It just says
`some_other_node->connect("the_signal", this, "my_method");`
I tried to add
`get_node("Reset")->connect("pressed", this, "on_Reset_pressed");`
in both _init and _ready. In the first case it returns an error because it can't find the node (Reset is a Button) and the second doesn't seem to do anything. Where should I put the connect call?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.