Hello! You may want to check SkeletonGhost.
Try it on an empty scene first.
- Add your SkeletonAnimation Spine GameObject to the empty scene. Choose an animation and enable loop.
- Add SkeletonGhost component to that same GameObject.
- Enter play mode and see the Ghosting effect.
Just play with the settings.
If you want the full colored mesh, disable Additive, set the color to white and opaque (full alpha), and set the Texture Fade slider to 0
.
You can enable and disable the effect by setting the SkeletonGhost component's ghostingEnabled
bool field.
This is due for an updated inspector and implementation with Spine 3.7 but we'll make sure the serialization won't break.
If you want to write your own component that does something more custom, just know that all SkeletonGhost currently does to pull the mesh is instantiate a copy of the UnityEngine Mesh which you can pull from the MeshRenderer on the Spine GameObject, then Destroy it after use.
Note that this will always behave like multiple sprites fading out, meaning having it at half-opacity will reveal the overlaps between individual sprites. You'll have to employ color and animation tricks if you don't want that to stand out.