Closed jonchun closed 4 years ago
No sure what you are trying to do.
Only EventType_Event has an actual event associated with it, otherwise _event is null.
so this works:
func test6()->void:
$SpineSprite.connect("animation_complete", self, "done");
$SpineSprite.get_animation_state().set_animation("dance", false, 0);
func done(a,b,c)->void:
print("Done")
It is meant for events in the timeline such as audio to be played or other meta data for the programmer.
It should be possible in code to add events to the callbacks, though. Need to discuss usage. I'd say go for it since otherwise godot crashes on calling a method on a null object.
I'm not actually using the SpineEvent
, but I'm documenting the fact that trying to do anything with the SpineEvent
causes a crash.
I'm not getting a null value for parameter c
, I'm getting a SpineEvent
object.
However, if I try to call any method on it other than just printing it, Godot crashes.
I fixed it.
Now the SpineEvent you got should be NULL in "animation_complete".
It crashed because the actual spine object is NULL.
Trying to do anything with a
SpineEvent
seems to crash Godot.