Skyhand

我参考了最新的3.8Demo,参照Mix And Match的做法,把spineboy生成SkeletonGraphic进行换装,发现换装有问题,请问用SkeletonGraphic进行换装需要做什么特殊的操作吗? 有SkeletonGraphic局部换装的demo吗?
Skyhand
  • Posts: 2

Harald

您使用SkeletonGraphic遇到什么问题?
What problem is it that you encountered with SkeletonGraphic?

通常,您可以像在SkeletonAnimation上那样在SkeletonGraphic上更改附件和外观。 它提供相同的skeletonGraphic.Skeleton属性。
In general, you can change Attachments and Skins on SkeletonGraphic as you would at SkeletonAnimation. It offers the same skeletonGraphic.Skeleton property.

请注意,CanvasRenderer目前仅将SkeletonGraphic限制为单一纹理,因此在关闭一些附件后,您可能需要通过 skin.GetRepackedSkin()重新包装皮肤。
请查看“脊柱示例”中包含的MixAndMatchGraphic.cs示例脚本:
spine-runtimes/MixAndMatchGraphic.cs at 3.8

Please note that SkeletonGraphic is currently limited to a single texture by CanvasRenderer, so you may need to repack the skin via skin.GetRepackedSkin(..) after switching out some attachments.
Please have a look at the MixAndMatchGraphic.cs example script included in the Spine Examples:
spine-runtimes/MixAndMatchGraphic.cs at 3.8
User avatar
Harald

Harri
  • Posts: 1524

Skyhand

感谢您的回复,之前我一直没看到
MixAndMatchGraphic.cs
这个示例文件,现在看到了,我的问题已经解决,非常感谢。
Skyhand
  • Posts: 2

Harald

感谢您与我们联系。 很高兴它有所帮助!
Thanks for getting back to us. Glad it helped!
User avatar
Harald

Harri
  • Posts: 1524


Return to 中国Spine用户