Hey there, I'm new to godot but long time unity dev. I'm having an issue with implementing custom signals, I've followed both the documentation and 4 or 5 different video tutorials on youtube, but it seems not matter what I do I can't get the signal to go through. I'm not sure if it's emitting wrong or if what's supposed to receive it isn't receiving it (don't know how to check that in godot).
I have it hooked up via the Node signal UI using the Connect option. I've also tried connecting it via code, I get the same result either way.
Is there something obvious like certain data types can't use signals? The two scripts in question are using extends Node and extends Node2D.
I'm on Godot 4.3, I'm leaving out most of the code for simplicity sake, but here's what I believe is the only relevant code
MonsterManager:
extends Node2D
signal new_mon_created
func create_new_mon(monsterBreed : String):
print("about to emit new mon created signal")
queue_free()
#emit_signal("new_mon_created") (tried both of these)
new_mon_created.emit()
The above print line does fire.
MonsterTestUI:
extends Node
#At one point I tried connecting via code like so below, but right now it's #setup with the node signal UI in editor
#func _ready():
##$"../MonsterManager".new_mon_created.connect(_on_monster_manager_new_mon_created)
func _on_monster_manager_new_mon_created():
print("received new mon created signal") #this never shows up in the output
I really appreciate any help/guidance, been struggling with this for a few hours >.>