Issue with Signal in C#

Godot Version



I have a node A as parent and a node B as child of node A.

In A is a ‘MySignal’ defined. Connecting an emitting the MySignal in A works fine, but when I try to emit the signal MySignal within B (e.g. _Process), I get then the error ‘ERROR: Can’t emit non-existing signal “MySignal”.’

I need to Call GetParent().EmitSignal(A.SignalName.MySignal); inside of B to get it working.

But this seems somehow wrong. Shouldn’t EmitSignal(A.SignalName.MySignal); from B work too?

You have to use GetParent(), because the signal is defined in A which is the parent. Without it, you’re trying to emit a signal in B for which there is no definition of. This is why you get the error that it doesn’t exist. Does this make sense?