通常,在替换附件(包括原始透明区域)时,重要的是原始附件大小(在 Spine 编辑器中使用)。导出骨架时,空白剥离(如果启用)将删除不必要的空白并将较小的区域打包到图集纹理。现在,当您想用另一个附件替换附件时,它需要适合原始附件大小,而不是剥离后的大小。
您的原始附件和替换精灵的大小是否相同,并且它们周围是否具有相同的空白区域?
请注意,替换附件的方法总是提供很多参数,其中许多参数保留为默认值。 Spine 示例场景中使用的 GetRemappedClone
Mix and Match
例如提供了 useOriginalRegionSize
、useOriginalRegionScale
等参数。
它也与您的附件类型有关:区域附件比网格附件(边界是固定的)支持更多的缩放和偏移选项。您的头部附件是区域附件还是网格附件?
In general it's the original attachment size (which was used in the Spine Editor) that matters when replacing attachments, including the original transparent area. When exporting the skeleton, whitespace stripping (if enabled) will remove unnecessary whitespace and pack the smaller region to the atlas texture. Now when you want to replace an attachment with another one, it needs to fit the original attachment size, not the stripped size.
Are both your original attachment and the replacement sprite of the same size, and do they have the same whitespace region around it?
Please note that the methods for replacing attachments always offer a lot of parameters, many of which are left at the default value. GetRemappedClone
used in the Spine example scene Mix and Match
for example provides useOriginalRegionSize
, useOriginalRegionScale
parameters amoung others.
It is also relevant of what type your attachment is: a Region Attachment supports more scaling and offset options than a Mesh Attachment (where the bounds are fixed). Is your head attachment a Region Attachment or Mesh Attachment?