To troubleshoot the issue of the Spine animation event not being detected in Godot 4.3, ensure the following:
Signal Connection: Verify that the animation_event
signal is correctly connected to the _on_animation_event
function. Double-check the spelling and ensure that the connection is made after the SpineSprite
node is fully initialized.
Event Name: Confirm that the event name in Spine matches exactly with what you are checking in Godot. The event name is case-sensitive.
Animation State: Ensure that the animation containing the event is being played on the SpineSprite
. You can use the get_animation_state()
method to verify the current animation.
Debugging: Add additional debug prints to check if the signal connection is being made and if the animation is playing as expected.
Here's a refined version of your setup with additional debugging:
extends SpineSprite
func _ready():
var animation_state = get_animation_state()
animation_state.set_animation("attack", false, 0)
spine_sprite.animation_event.connect(_on_animation_event)
print("Signal connected and animation set.")
func _on_animation_event(event_data) -> void:
print("[Event Debug] Event data received: ", event_data)
if event_data and event_data.name == "attack":
print("Attack event detected: ", event_data.name)
If the issue persists, consider checking if there are any updates or known issues with the spine-godot runtime for Godot 4.3 that might affect event handling.