0 votes

I have an EventManager class (AutoLoad) where I connect most of my signals. It is something like this:

signal my_signal

const MY_SIGNAL:String = "my_signal"

func add_listener(listener:Object, evt:String, method:String, params:Array = []):
    Utils.connect_event(self, evt, listener, method, params)


func remove_listener(listener:Object, evt:String, method:String):
    if listener.is_connected(evt, self, method):
        listener.disconnect(evt, self, method)

func send_event(evt:String, param1 = null, param2 = null):
    if param1 == null:
        emit_signal(evt)
    elif param2 == null:
        emit_signal(evt, param1)
    else:
        emit_signal(evt, param1, param2)

(I use the constant string so it is easier to fill the method parameters from outside the class.)

But when I am disconnecting one of my signals I get the following error:

E 0:00:02.365   is_connected: Nonexistent signal: overlay_completed.
  <C++ Error>   Method failed. Returning: false
  <C++ Source>  core/object.cpp:1548 @ is_connected()
  <Stack Trace> Events.gd:34 @ remove_listener()
                GameScreen.gd:38 @ on_overlay_completed()
                Events.gd:40 @ send_event()
                Overlay.gd:30 @ on_tween_completed()

But the overlay_completed signal exists and works. So why is this error showing up?

Godot version v3.3.3
in Engine by (12 points)

Please log in or register to answer this question.

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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.