A signal not finding the method in C#

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By star-stalking

I ran into the problem being that the signal (connected through the editor or in the code) cannot find the method that was made on signal connection, even though it is already made.
The error it gives is:

emit_signal: Error calling method from signal ‘area_entered’:
‘Area2D(Player.cs)::_on_TestLight_area_entered’: Method not found…

Any ideas to fix this?

:bust_in_silhouette: Reply From: star-stalking

Figured it out by going around looking at issues uploaded on GitHub.
You have to have a private void method inside the class.
…so, something like this:

 public class Name : Type {

    private void _on_signal_emitted(object area) //<-- (parameter used for 
        //Code here.

Also, it seems you’ll need to use the Godot internal editor to allow you to add a signal method when connecting for a signal in Godot instead of code. External editors do not allow Godot to add a signal function.