• Unity
  • Animation's Sprites didn't hide/show

  • تم التحرير
Related Discussions
...

Hi,

When i export animations into Unity and play it, some sprites do weird things.
It seems sprites inherit some properties when animation ends.

For example, i have this three animations in Spine:
-walk
-crawling
-grab an object

Image removed due to the lack of support for HTTPS. | Show Anyway

While in Spine looks good, in Unity the animation's sprites are completely mess:

Image removed due to the lack of support for HTTPS. | Show Anyway

How i fix that?

I use Spine 3.3.07 and runtime release yesterday (Jul-11).

Are you using SkeletonAnimation or SkeletonGraphic?


12 Jul 2016, 11:56


I recommend adding something like

skeleton.state.SetSlotsToSetupPose();
After every animation change.

7 أيام لاحقا

For this I use SkeletonAnimation, what is SkeletonGraphic?

I tried a lot of things, and nothing changes, for example I put this after every animation:

skeletonAnimation.skeleton.SetToSetupPose(); 

and got same results, sprites still inherit properties.

What can i do?

Do you have multiple tracks running or just one?

Hello, garrot

The surest but dirtiest way to assure that it matches what it looks like in the editor is to key all the things in all animations that you notice are being inherited from previous animations.

A quick way to see if your setup is simple enough to handle with some extra lines of code and no messy extra keys/no additional work matching things is to open your project and open AnimationState.cs and replace its code with this: https://gist.github.com/pharan/77c8ab0880c33716acb8
Make sure you remove your extra SetToSetupPose code if you use this modified AnimationState.cs

You can find a description of this behavior at the bottom of this first post: Noteworthy Spine-Unity Topics

7 أيام لاحقا

Hello guys,

Xelnath wrote

Do you have multiple tracks running or just one?

Nope, i just have one

Thank you Pharan, this extra lines works and fix the problem. I don't have extra sprites any more.

One more question, i have two characters in the final game (the images up here belongs to test project). I have one character with SkeletonAnimation and another with Mecanim. I have this issue in Mecanim too.
Do you know if there any way to fix this issue in Mecanim too?

Thanks.

9 أيام لاحقا

Hi,

I am using Spine for the first time with Unity, I am facing a problem whenever a change the animation at runtime the last frame of previous animation is visible in new animation clip. This issue after i export the json and other files that are required in unity. Currently i am using Spine essential V 3.2.

Please suggest a solution for the same.

hello akshaysule,

did you try the solution above?, it works for me.