I have a spine animation in my unity game and I call the portal in animation via a UI Button using:
skeletonAnimation.AnimationState.SetAnimation(0, "PortalOut", false);
it listens for a spine driven event at the end of PortalOut's Animation.
The Event then Disables the current SkeletonAnimation using skeletonAnimation.gameObject.SetActive(false);
and Enables the opposite character's SkeletonAnimation into the scene using skeletonAnimation.gameObject.SetActive(true);
once the skeletonAnimations have been swapped, it then plays the "PortalIn" Animation
spineAnimation.AnimationState.SetAnimation(0,"PortalIn",0);
for some reason when the PortalIn animation plays, it very briefly sets the animation to the setup pose then plays the animation afterwards.
is there a way to fix this? I appreciate any help!
I was able to Fix this problem ... Partially, by Adding a clipping mask that made the character invisible during the setup pose. the reason I say partially is because the first time I swap to the chicken character it still flashes in and out but every time after that it works perfectly fine.
The chicken and the pig were both set up the same way, but in unity's inspector the chickens set up pose wasn't correct. he was still visible. It turns out the chicken had 2 materials where the pig only had one causing the inspector to think the clipping mask wasn't there. I increased the size of the sprite sheet during the export from spine from 2048 to 3200 and it made all of the assets fit to one material. thus fixing my problem.