- 수정됨
Render at wrong position
Hi,
My spine is not renderring at the right place.
Please check the screenshot:
Spine Version: 4.1.08
Unity Version: 2022.1.15f1 (URP)
Spine-Unity-Runtime: 4.1 (2022.10.10)
Attach please find the demo project and spine project.
Please import the spine unity runtime to make the project work. I cant upload the whole project becase the limitation of the size of attachment.
Step to reproduce:
- Open the project.
- Open the 'SampleScene'
- Click the Button once. Just once! And wait for the spine animation to finish.
- After the spine animation is done and auto disabled.
- Click the Button again, you can see the spine is not playing properly. Please open the scene view side by side.
Thank you for preparing the Unity project to reproduce the problem, I found the cause. You are calling AnimationState clearTracks, which leaves the skeletons in their current pose, so it is the cause that the previous animation affects a later animation in an undesired way. You can call Skeleton setToSetupPose after clearTracks() to back your skeleton to setup pose.
Misaki wroteThank you for preparing the Unity project to reproduce the problem, I found the cause. You are calling AnimationState clearTracks, which leaves the skeletons in their current pose, so it is the cause that the previous animation affects a later animation in an undesired way. You can call Skeleton setToSetupPose after clearTracks() to back your skeleton to setup pose.
Thanks for your help so much. I managed to fix the problem by adding the following code after clearTracks
skeletonGraphic.Skeleton.SetToSetupPose();
skeletonGraphic.Clear();
I’m glad to hear the problem is fixed. Thank you for getting back to us!