• Unity
  • Issues with a character before it's animated

Hello all,

I have a small problem, but it's getting annoying as I'm getting close to release the game I'm working on.

I use several Spine animated characters in my game, and I have several components that modify their properties on Update. One of them modifies the color of the Skeleton (skeleton.SetColor), and another one modifies the picture on a slot (slot.Attachment = slot.Skeleton.GetAttachment).

Both of these won't work at first in my scenes, not until an animation is played on my skeleton. Problem is, even if I try to play an animation on Start, the problem remains until another animation is played later.

Is this a known problem ? Is there a workaround ?

Related Discussions
...
  • Modificato

Did you issue the following calls after changing attachments?

skeleton.SetSlotsToSetupPose();
skeletonAnimation.Update(0);
13 giorni dopo

Thanks for answering.

I tried and SetSlotsToSetupPose would just cancel my modification, so I took that away. Update isn't changing anything.

It's a very tricky issue to adress as everything is fine in the editor, the issue is just in the standalone build.

bodozore ha scritto

I tried and SetSlotsToSetupPose would just cancel my modification, so I took that away. Update isn't changing anything.

Sorry, I didn't read your initial posting well enough, I thought you were setting the attachment at a skin. SetSlotsToSetupPose would just be called after assigning a skin. After manually setting attachments at a slot, it should be sufficient to only have LateUpdate() called, which should be called after your method anyway. From where is your code called? Are you getting SkeletonRenderer.LateUpdate() calls at all, or are these components perhaps disabled? If you can create a minimal Unity project that still shows the error, you can send it to contact@esotericsoftware.com as a zip package (shortly mentioning this forum thread URL so that we know the context). Then we can have a look at it.

bodozore ha scritto

It's a very tricky issue to adress as everything is fine in the editor, the issue is just in the standalone build.

Which settings do you have active at Project Settings - Editor - Enter Play Mode Settings? Perhaps it helps creating the same situation as in your build by setting everything to "fully reload".