Hi, I'm working on a 2D game using Spine.
I have a 'talk' animation, but it doesn’t play when dialogue runs.
Am I supposed to trigger the talk animation manually? If so, any guidance on how to set this up would be greatly appreciated.
FYI, The parent game object contains Player component and its cihld game object contains SkeletonAnimation.
https://imgur.com/a/bEIlaF5
I followed the instructions here to integrate Spine with Adventure Creator:
https://adventure-creator.fandom.com/wiki/Spine_Integration
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
It should kick in automatically, so long as the character is stationary at the time.
Do you get any messages in the Console, and does the character have all the animations listed when you expand the "List expected animations?" foldout?
Hi, thank you so much for your reply. You're right. I realized the issue was because the "Don't animate speaker?" option was unchecked in the Dialogue: Play Speech action.
However, when I uncheck "Don't animate speaker?", the character's idle animation disappears, and it shows the 'none' animation state. My character uses different bones for various poses, so it has multiple arms, legs, and heads.
Is there a way to mix the idle animation with the talk animation? Ideally, I want Idle + Talk to play together. If not, I'll dive deeper into Spine to find a solution. Thank you!
The integration assumes either Talk or Idle is played, when the character is speaking.
If you check Head on separate layer?, however, you can have the talking animation appear on a non-root layer. I've updated the script with a minor bugfix related to this.
Thank you so much for your continued support! I just wanted to share an update. I tested everything in a fresh project with Adventure Creator and Spine, using the updated integration scripts from the Wiki page. I also checked the Head on separate layer? option and assigned track 2 for the head animations. However, when dialogue runs, instead of playing the 'talk' animation as expected, the character only shows the first frame of the animation — essentially freezing with an open mouth. Then, when I click to finish the subtitles, the 'talk' animation plays continuously until I click again.
Since this isn't an urgent part of the game's mechanics, there's no rush, but I genuinely appreciate your support once again.
Try it now.
Hi Chris,
Thank you so much for your prompt update once again. I truly appreciate your support.
Unfortunately, I’m still encountering the same issue: the character only shows the first frame of the 'talk' animation and appears frozen, and then, once the dialogue ends, the talk animation plays continuously.
Over the past few months, I’ve been learning Spine and came up with two scripts that seem to work. However, since I’m quite new to coding, I’m not entirely sure if my approach is optimal in terms of performance or best practices. The scripts work for now, but I’d love to fully utilize Adventure Creator's Dialogue Action, especially the Don’t animate speaker? and Play in background? options, which are incredibly useful.
DialogueAnimationHandlerSpine2D.cs
https://drive.google.com/file/d/11iwlMKGERJaGSQfGcGYXm3sekz3KanpJ/view?usp=drive_link
PlayerAnimationControllerSpine2D.cs
https://drive.google.com/file/d/1Ta8I_l7hnSS3k1Qv_h_btbVZZnAfhAQa/view?usp=drive_link
I’m sharing these scripts in case they might save you some time and help avoid digging through the Spine Runtime documentation. (Although I’m 100% sure you know far more about it than I do, and my handling of the talk animation is quite direct and unpolished. But just in case!)
Thank you again for your continued support of third-party integrations like Spine, and for empowering so many of us to create our own games!
Rather than hooking into the OnStartSpeech event, hook instead into the OnStartSpeech_Alt event, which takes a single Speech parameter.
This Speech parameter is the instance of the line of dialogue - within which you can get its various properties.
The "Don't animate speaker?" field is linked to noAnimation, and "Play in background?" is linked to isBackground:
Thanks for sharing the references! Unfortunately, the scripts I provided aren't working. Sorry for the false update—I've just noticed that the same issue persists. It's so frustrating because everything was working fine just a couple of days ago...I'll take a closer look at Spine and see if I missed anything.
I created a fresh Unity project and set up a simple Spine animation to test the Talk animation. However, I found that the issue is still present.
I've set the Head on Separate Layer option and assigned track 2 for the Talk animation. https://imgur.com/a/vEoWGis
Here's what happens in two cases:
When I click on a Hotspot that triggers Dialogue: Play Speech, the following issue occurs: https://drive.google.com/file/d/1_dJk2J5sHI06JKLFO47TjZvnINsaIQKD/view?usp=sharing
If I uncheck the Head on Separate Layer option,
· the Talk animation keeps looping, even after the speech scroll ends. I need to manually click the screen to stop the Talk animation,
· and as you already know, the Idle animation disappears.
Case 2 (To test if custom animations work during dialogue)
When I click on a Hotspot that triggers Character: Animate / Method: Play Custom and then Dialogue: Play Speech, the following occurs https://drive.google.com/file/d/1rA0RjKMUMvbWSxYdS6AFnaygthzT4b1v/view?usp=sharing
For Case 2, this issue happens whether 'Head on Separate Layer' is checked or not.
I hope this information helps in identifying the cause. Thank you so much for your support, and please let me know if you need any more details to resolve the issue.
Does your Head have a separate "idle" animation? When the character is not talking, and a separate head is assigned, they'll play the idle animation so that the mouth resets afterwards.
When I click on a Hotspot that triggers Character: Animate / Method: Play Custom and then Dialogue: Play Speech, the following occurs https://drive.google.com/file/d/1rA0RjKMUMvbWSxYdS6AFnaygthzT4b1v/view?usp=sharing
The integration causes custom states to override all else, but you should be able to play talking manually during this time with a custom script:
Hi Chris, thanks for getting back to me so quickly.
No, the head doesn’t have a separate 'idle' animation. In fact, even the idle animation doesn’t include any 'lip' keys at all.
And thank you so much for the custom script! I attached it to my character, and it works, but now I'm experiencing the same issue as in Case 1 that I mentioned earlier.
You'll need to assign an idle animation for the head - a one-frame animation that "resets" the lip.
Thank you so much for your response!
Just to clarify, my talk animation is set up in Spine as multiple lip attachments toggling visibility. I initially thought I needed to add a one-frame lip animation to my Idle animation, so I added a default lip visibility key to the Idle.
However, the issue persists, so I was wondering—did you mean I should create a combined talk-idle animation? And are you referring to doing this with a custom script? I’m asking because I can’t find where to assign the idle for the head layer in the Player or NPC component. Apologies if I’m missing something obvious.
I'm referring to a separate "Idle" animation that is only intended for being played on the head. At this point I can't remember who wrote this portion of the script, but when idle, it attempts to play an idle animation of the same name as your full-body idle animation on the head.
This could be amended to be a separate animation name (e.g. "Idle_Head") if Spine needs to have all-unique animation names.
Thank you so much for the clarification! Now I understand. I think I’ll create a separate idle animation for the head—just a single frame for the lip in my case, since my talk animation only involves switching between different lip attachments. After that, I'll look into ways to blend the tracks. Thanks again!