-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
Calling connect
within extension class ctor causes set_instance_bindings error
#1312
Comments
Thanks! I think this is a variation on issue #1039 Basically, at present, you can't pass |
Can you try using |
No, because unfortunately |
I found a workaround that works for me I added _init() method to Wrapped
And call at end of the Wrapped::_postinitialize
And I just use _init instead of constructors. |
Generally many signals are best to connect on entering the tree, partially due to threading, see: |
PR #1321 was recently merged to fix |
Thanks, based on the feedback, I am going to close this as it seems the agreed approach is to use a later phase during object construction than the constructor to perform signal connections. |
Godot version
4.2
godot-cpp version
4.2
System information
Windows 11
Issue description
When calling the
connect
method from within a GDE class ctor, the following error is thrown:Steps to reproduce
Create a simple GDE class and register signal listener callback in the ctor:
When the class is created, the error will be thrown.
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: