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:
1. Open the project.
2. Open the 'SampleScene'
3. Click the Button once. Just once! And wait for the spine animation to finish.
4. After the spine animation is done and auto disabled.
5. Click the Button again, you can see the spine is not playing properly. Please open the scene view side by side.
Page 1 of 1
Ward
You do not have the required permissions to view the files attached to this post.
3 months ago
- Ward
- Posts: 3
Misaki
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. 3 months ago
-
Misaki - Posts: 1164
Ward
Thanks for your help so much. I managed to fix the problem by adding the following code after clearTracksMisaki wrote:Thank you for preparing the Unity project to reproduce the problem, I found the cause. You are callingAnimationState 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 callSkeleton setToSetupPose
after clearTracks() to back your skeleton to setup pose.
skeletonGraphic.Skeleton.SetToSetupPose();
skeletonGraphic.Clear();
skeletonGraphic.Clear();
3 months ago
- Ward
- Posts: 3
Misaki
I’m glad to hear the problem is fixed. Thank you for getting back to us!
3 months ago
-
Misaki - Posts: 1164
Mark topic unread
• Page 1 of 1
Return to Unity
- All times are UTC