• 中文
  • 切换动画表情消失了

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

一个SkeletonData有两个动画,这两个动画有不同的表情,在我切换动画时,表情消失了。
我不知道这是程序的问题,还是动画制作不规范的问题,
所以我已经将项目范例工程,以及动画工程文件都发到了这个邮箱:contact@esotericsoftware.com
期待您的回复,非常感谢!

谢谢你寄来的复制包。
Thanks for sending the reproduction package.

由于你没有设置任何皮肤(Initial Skin Name留在default),你需要在sg.Initial Initialize(true);之后调用sg.Skeleton.SetSlotsToSetupPose();
Since you are not setting any skin (Initial Skin Name is left at default), you need to call sg.Skeleton.SetSlotsToSetupPose(); after sg.Initialize(true);.

sg = obj.GetComponent<SkeletonGraphic>();
sg.Initialize(true);
sg.Skeleton.SetSlotsToSetupPose();
sg.AnimationState.SetAnimation(0, "anim2", true);
Harald написал

谢谢你寄来的复制包。
Thanks for sending the reproduction package.

由于你没有设置任何皮肤(Initial Skin Name留在default),你需要在sg.Initial Initialize(true);之后调用sg.Skeleton.SetSlotsToSetupPose();
Since you are not setting any skin (Initial Skin Name is left at default), you need to call sg.Skeleton.SetSlotsToSetupPose(); after sg.Initialize(true);.

sg = obj.GetComponent<SkeletonGraphic>();
sg.Initialize(true);
sg.Skeleton.SetSlotsToSetupPose();
sg.AnimationState.SetAnimation(0, "anim2", true);

问题解决了,谢谢!

谢谢你让我们知道,很高兴它帮助了我们。
Thanks for letting us know, glad it helped.