ouimilady

如何更换部分皮肤,比如只更换人物的不同帽子,不同衣服,进行混搭,而非整套替换。求解
ouimilady
  • 帖子: 1

Luke

你好,

请参阅我们关于皮肤的用户指南部分,有一个标记为“混合和匹配”的部分,其中有一个示例项目准确描述了这一点。 如果这没有帮助,请告诉我们,我们将帮助您进一步排除故障!

链接:http://esotericsoftware.com/spine-skins#Mix-and-match
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Hello,

Please see our User Guide section on Skins, there is a section labeled "Mix and Match" that has an example project describing exactly that. If this doesn't help, let us know and we'll help you troubleshoot further!

Link: Skins - Spine User Guide: Mix and match
Luke

Luke
  • 帖子: 52

ater

Luke 写道:你好,

请参阅我们关于皮肤的用户指南部分,有一个标记为“混合和匹配”的部分,其中有一个示例项目准确描述了这一点。 如果这没有帮助,请告诉我们,我们将帮助您进一步排除故障!

链接:http://esotericsoftware.com/spine-skins#Mix-and-match
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Hello,

Please see our User Guide section on Skins, there is a section labeled "Mix and Match" that has an example project describing exactly that. If this doesn't help, let us know and we'll help you troubleshoot further!

Link: http://esotericsoftware.com/spine-skins#Mix-and-match
————————————————————————————————————————————————
你好,
我已经明白如何在Spine里“混合和匹配”,
QQ图片20220105121816.png

但更想了解如何在unity里更换部分皮肤,比如只更换人物的不同帽子,不同衣服,进行混搭,而非整套替换。
QQ图片20220105121942.png

----------------------------------------------------------------------------------------------------------------------------------------------------------------
Hello,
Spine "Mix and Match" ,I get.
Unity "Mix and Match" ,How to do ?
您没有权限查看这个主题的附件。
ater
  • 帖子: 4

Misaki

你好。
在你将骨架放置在你的场景中之前,先看一个实例场景 Spine Examples/Other Examples/Mix and Match Skins会更容易理解如何组合多个皮肤。根据你附上的截图,你一直在研究SkeletonAnimation组件,但你不能在SkeletonAnimation组件上组合多个皮肤。 要组合多个皮肤,你需要自己编写脚本。别担心,如果你参考这个样本场景中GameObject Character所附的Mix And Match Skins Example.cs,就不会有什么困难。
MixAndMatchSkins.jpg

更多信息请见以下页面。
Blog: Spine 3.8版本已发布: 改进皮肤API
spine-unity Runtime Documentation: 组合皮肤

能帮上忙真是太好了。

---

Hi,
It is easier to see an example scene Spine Examples/Other Examples/Mix and Match Skins before you place the skeleton in your scene to understand how to combine multiple skins. You've been looking into SkeletonAnimation component according to the screenshot you attached, but you cannot combine multiple skins on the SkeletonAnimation component. To combine multiple skins, you need to write your own script. Don't worry, it is not so difficult if you refer to Mix And Match Skins Example.cs that is attached to the GameObject Character in the sample scene.
MixAndMatchSkins.jpg

Please see the following pages for more information:
Blog: Spine 3.8版本已发布: 改进皮肤API
spine-unity Runtime Documentation: 组合皮肤

I hope this will help you.
您没有权限查看这个主题的附件。
头像
Misaki

Misaki
  • 帖子: 329

ater

Misaki 写道:你好。
在你将骨架放置在你的场景中之前,先看一个实例场景 Spine Examples/Other Examples/Mix and Match Skins会更容易理解如何组合多个皮肤。根据你附上的截图,你一直在研究SkeletonAnimation组件,但你不能在SkeletonAnimation组件上组合多个皮肤。 要组合多个皮肤,你需要自己编写脚本。别担心,如果你参考这个样本场景中GameObject Character所附的Mix And Match Skins Example.cs,就不会有什么困难。
MixAndMatchSkins.jpg

更多信息请见以下页面。
http://zh.esotericsoftware.com/blog/Spine-3-8-released#%E6%94%B9%E8%BF%9B%E7%9A%AE%E8%82%A4API
http://zh.esotericsoftware.com/spine-unity#%E7%BB%84%E5%90%88%E7%9A%AE%E8%82%A4

能帮上忙真是太好了。

---

Hi,
It is easier to see an example scene Spine Examples/Other Examples/Mix and Match Skins before you place the skeleton in your scene to understand how to combine multiple skins. You've been looking into SkeletonAnimation component according to the screenshot you attached, but you cannot combine multiple skins on the SkeletonAnimation component. To combine multiple skins, you need to write your own script. Don't worry, it is not so difficult if you refer to Mix And Match Skins Example.cs that is attached to the GameObject Character in the sample scene.
MixAndMatchSkins.jpg

Please see the following pages for more information:
http://zh.esotericsoftware.com/blog/Spine-3-8-released#%E6%94%B9%E8%BF%9B%E7%9A%AE%E8%82%A4API
http://zh.esotericsoftware.com/spine-unity#%E7%BB%84%E5%90%88%E7%9A%AE%E8%82%A4

I hope this will help you.
太神奇了!
QQ图片20220105145427.png

我理解你所说的“组合多个皮肤”的方式了。
但现在又有一个新的问题,我在使用“PhotoshopToSpine.jsx”切图时,未勾选“Trim whitespace”
QQ图片20220105144351.png
,这样重组出来的png图集是否会变得十分巨大,如:
QQ图片20220105142849.png

在Spine导出时可以勾选除去空白
QQ图片20220105143047.png
,导出的图集很小:
QQ图片20220105144729.png

unity里重组的png图集可以有类似Spine导出的去除空白方法吗?如果没有的话,我需要把之前的Spine文件切图用勾选“Trim whitespace”的方式重新导出匹配。如果有,希望能告诉我这种方式,谢谢!
(之所以有这种担忧,是因为以前一个使用cocos引擎的换装项目,没有选“Trim whitespace”,抓取导出的图集就是十分巨大。我不知道unity是不是也会这样)
Amazing!
This is feasible.
But there's a new problem.
If I don't check "Trim Whitespace",the resulting PNG atlas would be huge?how to resolve....
您没有权限查看这个主题的附件。
ater
  • 帖子: 4

Misaki

自动翻译可能不准确,我可能有点误解了你的问题,但是GetRepackedSkins()方法也可以用来重新打包使用Strip whitespace X/Y导出的纹理图集。因此,你可以在Spine编辑器中使用 "Strip whitespace "X/Y选项导出一个小纹理图集。如果你已经尝试过,但没有成功,请查看文档中的重要提示。

---

The auto-translation may not be accurate and I may have misunderstood your question a bit, but GetRepackedSkins() method can be used to repack a texture atlas that exported using Strip whitespace X/Y too. Therefore, you can export a tiny texture atlas using Strip whitespace X/Y option from Spine editor. If you have already tried and failed to do so, please check the 重要提示 in the documentation.
头像
Misaki

Misaki
  • 帖子: 329

ater

Misaki 写道:自动翻译可能不准确,我可能有点误解了你的问题,但是GetRepackedSkins()方法也可以用来重新打包使用Strip whitespace X/Y导出的纹理图集。因此,你可以在Spine编辑器中使用 "Strip whitespace "X/Y选项导出一个小纹理图集。如果你已经尝试过,但没有成功,请查看文档中的重要提示。

---

The auto-translation may not be accurate and I may have misunderstood your question a bit, but GetRepackedSkins() method can be used to repack a texture atlas that exported using Strip whitespace X/Y too. Therefore, you can export a tiny texture atlas using Strip whitespace X/Y option from Spine editor. If you have already tried and failed to do so, please check the 重要提示 in the documentation.
我的意思是在Spine导出时,我可以选择 "Strip whitespace "X/Y选项导出没有多余空白部分的图集。
但担心使用unity组合特定的皮肤图集时,生成的图集无法清除多余空白部分,会变得很巨大。
原本一张png图集会变成多张png图集。
QQ图片20220105173615.png

至少之前的换装项目有过这样的问题,当时程序员用的是cocos。

所以想知道unity里用这种更换部分皮肤生成的图集是否可以清除多余空白部分?
——
I mean when exporting Spine, I can select the "Strip whitespace "X/Y option to export an atlas with no extra whitespace.
However, there is a concern that when you combine a specific skin atlas in Unity, the resulting atlas will not clear the excess white space and become huge.
What was once a single PNG image assembly has become a collection of PNG images.
At least that was the case with previous makeovers, when the programmers used cocos.

So I want to know if you can clean up the extra white space in Unity by replacing part of the skin to create an atlas?
您没有权限查看这个主题的附件。
ater
  • 帖子: 4

Misaki

你可能对何时剥离空白有误解。一般来说,你不能在Unity中剥离你的骨架图像的空白。但是,如果你使用一个从Spine编辑器导出的带有Strip Whitespace选项的图集,并在Unity中重新打包,重新打包后创建的新图集也将是一个去除多余空白的图集。换句话说,在Unity中重新打包并不会使纹理比原来的大。

我自己试过了,所以我认为上面的答案是正确的,但是如果你真的在你的项目中试过了,有什么不成功的地方,请再问。



You may have a misunderstanding about when to strip whitespace. In general, you can't strip whitespace of your skeleton's images in Unity. However, if you use an atlas that was exported with Strip Whitespace option from Spine editor and repack it in Unity, the new atlas created by the repacking will also be the one with the extra whitespace removed. In other words, repacking in Unity does not make the texture any larger than the original one.

I've tried it myself, so I think the above answer is correct, but if you actually try it in your project and something doesn't work, please ask again.
头像
Misaki

Misaki
  • 帖子: 329

ater

Misaki 写道:你可能对何时剥离空白有误解。一般来说,你不能在Unity中剥离你的骨架图像的空白。但是,如果你使用一个从Spine编辑器导出的带有Strip Whitespace选项的图集,并在Unity中重新打包,重新打包后创建的新图集也将是一个去除多余空白的图集。换句话说,在Unity中重新打包并不会使纹理比原来的大。

我自己试过了,所以我认为上面的答案是正确的,但是如果你真的在你的项目中试过了,有什么不成功的地方,请再问。



You may have a misunderstanding about when to strip whitespace. In general, you can't strip whitespace of your skeleton's images in Unity. However, if you use an atlas that was exported with Strip Whitespace option from Spine editor and repack it in Unity, the new atlas created by the repacking will also be the one with the extra whitespace removed. In other words, repacking in Unity does not make the texture any larger than the original one.

I've tried it myself, so I think the above answer is correct, but if you actually try it in your project and something doesn't work, please ask again.
非常感谢!我会让程序先试试看的! :heart: :heart: :heart:
——
Thank you very much! I'll let the program try it first!
ater
  • 帖子: 4


回到 中国Spine用户