Here's the Spine Support package:
DS_Spine_Support_2019-05-26.unitypackage
(Exported from Unity 2018.3.0)
It uses standard Spine animation; you don't have to use Mecanim for the Spine animation.
To set it up:
1. Add a SpineDialogueActor component to your character's GameObject. (This can be an empty GameObject. It doesn't have to be the Spine character.)
2. Add your Spine character to the scene, and assign it to the SpineDialogueActor's Spine GameObject field. You can deactivate the Spine character if you want. It will be activated as needed during conversations.
3. In your Standard Dialogue UI, replace the StandardUISubtitlePanel components with SpineSubtitlePanel components.
That should take care of the basics.
To tween in/out:
1. Add an Animator to the character's GameObject (the same one that has the SpineDialogueActor component). Add Show and Hide triggers that tween the Spine character in and out. (See the example scene.)
2. Assign the Show and Hide trigger names to the DialogueActor component.
To play additional animations:
1. Add a SpineSequencerReferences component to the character's GameObject. Assign the Spine character to the Skeleton Animation field, and assign Spine animations to the Animation Reference Assets list.
2. Use the new SpineAnimation() sequencer command:
SpineAnimation(animationName, [trackIndex], [loop], [subject])
Parameters:
- animationName: Name of an animation asset in the subject's SpineSequencerReferences component.
- trackIndex: (Optional) Track index to use. Default: 0.
- loop: (Optional) Loop or not. Default: true.
- subject: (Optional) Spine GameObject with a SpineSequencerReferences component. Default: speaker.
Examples:
Code: Select all
SpineAnimation(wave);
SpineAnimation(bow,0,false,listener)@1
This example loops the "wave" animation on the speaker. At the 1-second mark, it plays the bow animation one time on the listener.