How to connect signal from C# to GDScript

Godot Version


I have declared a signal in c# using the following:

	public delegate void abcEventHandler(Boolean connect);

The i am later on emitting the singal using

EmitSignal("abcEventHandler", true );

How can i react on this signal in GDScript?

i am trying to do

connect("abc", someUpdateFunction)

However i get the following error:
In Object of type 'Node3D': Attempt to connect nonexistent signal 'abc' to callable 'Node3D( someUpdateFunction'

I have tried abcEventHandler as well

The signal name is abcEventHandler isn’t it? Shouldn’t you be connecting to it instead of “abc”?

EDIT: I didn’t see that you tried that as well.

Have you tried connecting like so - connect(c_sharp_node.abcEventHandler, someUpdateFunction)

you have reference to object class sending signal?

func _ready():
	var MyNode = get_node("..")

Signal will be called from parent ".."

	if MyNode != null and MyNode.has_signal("MySignal"):

I checked if signal exist and connect method _print_me() to signal

func  _print_me():

Parent C Sharp script

	public delegate void MySignalEventHandler();
    public override void _PhysicsProcess(double delta)
		var error = EmitSignal(SignalName.MySignal);

This should be correct way to connect signal from a node for godot 4

1 Like

Ok maybe i have a weird setup.

I have a node

This creates a new instance of the object MyCSharpScript.cs

MycSharpScript.cs is NOT a node (previously was, changed it). it does not extend the node class since this is isnt needed for me.

In i do the following:

var object
var my_csharp_script = load("res://scripts/MycSharpScript.cs")

func _ready():
	var MyNode = get_node("..")
	object =
	if MyNode != null and MyNode.has_signal("abc"): //tried abcEventHandler
		print("No such signal")

In the logs i see “No Such Signal”

Q: Should i make it node?

Q: Can a non-node class emit a signal?

A script needs to extend at least from Object to be able to use Godot’s signal system. You can try using Object.get_signal_list() to get a list of signals from that object and see how it’s called.


try rename function to


you sure parent sending signal?

I wasent able to get this working and decided to make my main scene in c# instead of gdscript.