As I understood in defold 1.2.88 you change spine callback.
And now callback has all parameters like on_message and can has different message_id.
And, one more important that callback can be call not only when animation ended and by spine events too.
Am I right?
I can’t find information about this changes in docs but this changes broke my project animations(
example of new callback
local function callback_example(self, message_id, message, sender)
print(message_id)
pprint( message)
print(sender)
end
spine.play("#spinemodel", "idle_var1",go.PLAYBACK_ONCE_FORWARD, 0.1, callback_example)
Thanks for reporting this, I’m looking into it!
There should not have been any changes to the function signature of the callback, at least not by design.
Update: Tracked down the error, turns out this was a bug introduced in the latest release, related to the internal changes of our spine runtime. Many thanks to @AGulev for reporting this!
@AGulev: Regarding your initial question about the callback function parameter list… The function signature has not changed, but it was/is not described correctly in the documentation. Due to the way the callback is triggered internally (by using the message passing system) means you will actually get the same parameters as if it was triggered through on_message, and as you pointed out it will be; callback(self, message_id, message, sender).