Zethyn

All of my spine skeletons pop in as their set up pose for a single frame before transitioning to their animation.
This happens on instantiating or when enabling the skeleton's game object for the first time. The clear state on disable hasn't helped.

SetupPoseToAnimation.gif


I've tried setting the skeleton's animations to None and setting through code with SetAnimation, and I've tried with just setting in the object's settings with no luck.

If anyone knows the solution please let me know, I feel like I've tried way too much to figure this out myself without any success.

Thanks for any suggestions anyone might have!
You do not have the required permissions to view the files attached to this post.
Zethyn
  • Posts: 3

Harald

Depending on where you are issueing the instantiation call (e.g. from coroutines, etc.), it might be missing a call to Update() before LateUpdate().

So you could add the following after your instantiation call:
GameObject instance = Instantiate(clickEffectPre, transform);
var skeletonAnimation = instance.GetComponent<SkeletonAnimation>();
skeletonAnimation.Update(0); // this line should help
skeletonAnimation.LateUpdate(); // you could also check if this additional line is also necessary
This thread explains it in more detail:
How to set first frame before animation starting in Unity?

We will modify the runtime in a future update so that this manual call is no longer necessary, regardless of where the instantiation took place.

---

This issue should be fixed now.
New unitypackages can be downloaded here as usual:
Spine Unity Download

Please let us know if this resolves your case as well. Thanks for reporting!

The issue has been tracked under this id:
[unity] Update potentially not called after Initialize · #1646
User avatar
Harald

Harri
  • Posts: 4328

Zethyn

Thank you so much Harald, it looks like it's working perfectly now!

I really appreciate the help and the quick return on the fix!
Zethyn
  • Posts: 3

Harald

Very glad to hear, thanks for letting us know it works! Thanks again for reporting.
User avatar
Harald

Harri
  • Posts: 4328


Return to Unity