0 votes

Hi,
each time I try to connect a button "press" signal to a function with binds in C#, I get a "method not found" error on click. As soon as I remove the binds, everything works:

b.Connect("pressed",this,"_ButtonPressed");
works with
private void _ButtonPressed()

However,

b.Connect("pressed",this,"_ButtonPressed",new object[]{i,j});

doesn't work with

private void _ButtonPressed(object[] binds)

Is there a bug in Godot, or is it me?

Thanks a lot.

asked Feb 1 in Engine by Antonb (58 points)

I managed to bypass it with:
b.Connect("pressed",this,"_ButtonPressed",new object[]{new object[]{i,j}});

while the receiving function signature remains

private void _ButtonPressed(object[] binds)

Seems like a bug to me, any thoughts?

1 Answer

0 votes
answered Feb 10 by Antonb (58 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.