Skip to content
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

Viewport2Din3D connect_scene_signal function arguments incorrect #441

Closed
Malcolmnixon opened this issue Apr 8, 2023 · 0 comments
Closed

Comments

@Malcolmnixon
Copy link
Collaborator

In the master branch the Viewport2Din3D connect_scene_signal function is written as follows:

# Connect a 2D scene signal
func connect_scene_signal(which, on, callback):
    if scene_node:
        scene_node.connect(which, on, callback)

This matches the Godot 3 signature for connect:
Error connect ( String signal, Object target, String method, Array binds=[ ], int flags=0 )
However it should be modified to match the Godot 4 signature for connect:
Error connect ( StringName signal, Callable callable, int flags=0 )

As such the connect_scene_signal function should be modified to something like:

# Connect a 2D scene signal
func connect_scene_signal(which : String, callback : Callable, flags : int = 0):
    if scene_node:
        scene_node.connect(which, callback, flags)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant