• 中文
  • 关于换肤时皮肤出现部件错乱的问题

各位你们好,我现在遇到的问题是,我在spine预览界面看到的是完整的三个皮肤没有任何错乱,但是我提交给程序放到APP上切换皮肤时,皮肤是错乱的,比如晚上的皮肤会出现只有白天皮肤才有的白云,或者白云会出现在傍晚和晚上两个皮肤上面,我不知道这是什么原因,有谁知道吗?如果知道随时留言,谢谢!

Related Discussions
...
  • Изменено

我很抱歉听到你遇到麻烦。不幸的是,在没有听到更多关于你是如何实现骨架的情况下,我们无法确定其原因。如果你能告诉我们你使用的是哪种运行时,用什么代码实现的,如果可能的话,给我们看一下实际问题的截图,我将非常感激。

I'm sorry to hear you're having trouble. Unfortunately, without hearing more about how you are implementing the skeleton, we cannot determine the cause. I would appreciate it if you could tell us which runtime you are using and what code you are implementing it with, and if possible, show us screenshots of the actual problem.


截图里面的三个皮肤分别为早上,傍晚,晚上,但是都出现了早上的白云,这是不应该的

谢谢你的截图! 你没有使用 Skeleton setSlotsToSetupPose,所以这就是为什么它显示其他皮肤的附件。请参阅运行时皮肤页面以了解更多信息。
Thank you for the screenshots! You did not use Skeleton setSlotsToSetupPose so that's why it shows attachments for other skins. Please see the Runtime Skins page of the runtime guide for more information:
Runtime Skins - Spine Runtimes Guide: 更换皮肤

非常感谢,我去看看


这样设置还是会有的


请问这个问题出在哪里呢

正如运行指南中所述,改变皮肤的一般代码如下。:
As described in the runtime guide, the general code to change skin is below:

skeleton.setSkin(newSkin); // 1. 设置使用皮肤
skeleton.setSlotsToSetupPose(); // 2. 使用装配姿势设置基础附件。
animationState.apply(skeleton); // 3. 使用AnimationState设置当前运动中使用的附件。

所以你能不能试着加入animationState.apply(skeleton);
So could you please try to add animationState.apply(skeleton);?

感谢,我发给程序看看


非常感谢!问题已经解决了皮肤都正常展示了

我很高兴听到它现在能正确显示。谢谢你给我们回信!
I’m glad to hear that it is now displayed correctly. Thank you for getting back to us!