EsotericSoftware / spine-runtimes

2D skeletal animation runtimes for Spine.
http://esotericsoftware.com/
Other
4.42k stars 2.92k forks source link

[godot]The value of user-defined event keys cannot be correctly obtained. #2650

Closed misaki-eymard closed 1 month ago

misaki-eymard commented 1 month ago

Description: There is a problem where the Int, Float, and String values set as event keys in the animation cannot be correctly obtained using the get_int_value(), get_float_value(), and get_string_value() methods of SpineEventData, respectively. To be more specific, the values obtained from get_int_value() and get_float_value() will always be 0, and the value obtained from get_string_value() will be empty.

Expected behavior: The Int, Float, and String values set for that event key can be correctly retrieved using the corresponding methods.

Steps to reproduce:

  1. Download the attached .zip file: unable-to-get-the-values-of-event-keys.zip
  2. After extracting the .zip file, open the Godot project contained within it with Godot 4.3.
  3. When you play back the scene, the values obtained from the event key will be printed in the Output Dock as follows: Screenshot 2024-10-06 at 18 11 02
  4. To check the correct values, open spineboy-pro.spine-json in the spineboy folder using any text editor: Screenshot 2024-10-06 at 18 14 08 If you compare the output with the log output to the Output Dock, you will see that 0, 0, and empty values are returned where values such as 2, 0.2, and Run-1 should be returned.

The version of the spine-godot runtime in which this issue was found: Godot 4.3 (Other versions have yet to be tested)

This issue was reported in the following thread on the forum: https://esotericsoftware.com/forum/d/26996-spine-godot-cant-get-values-of-event

misaki-eymard commented 1 month ago

I'm sorry, but trying to get the event key values from SpineEventData in the first place was a mistake. I'm closing this ticket.