mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-03 06:09:09 +08:00
[unity] Fixed SkinUtilities.GetClonedSkin performing shallow copy at Attachment key. Closes #1599.
This commit is contained in:
parent
ce61d429fd
commit
3cf66670cc
@ -135,12 +135,15 @@ namespace Spine.Unity.AttachmentTools {
|
|||||||
|
|
||||||
if (cloneAttachments) {
|
if (cloneAttachments) {
|
||||||
if (overwrite) {
|
if (overwrite) {
|
||||||
foreach (var e in sourceAttachments)
|
foreach (var e in sourceAttachments) {
|
||||||
destinationAttachments[e.Key] = e.Value.GetCopy(cloneMeshesAsLinked);
|
Attachment clonedAttachment = e.Value.GetCopy(cloneMeshesAsLinked);
|
||||||
|
destinationAttachments[new Skin.SkinEntry(e.Key.SlotIndex, e.Key.Name, clonedAttachment)] = clonedAttachment;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
foreach (var e in sourceAttachments) {
|
foreach (var e in sourceAttachments) {
|
||||||
if (destinationAttachments.ContainsKey(e.Key)) continue;
|
if (destinationAttachments.ContainsKey(e.Key)) continue;
|
||||||
destinationAttachments.Add(e.Key, e.Value.GetCopy(cloneMeshesAsLinked));
|
Attachment clonedAttachment = e.Value.GetCopy(cloneMeshesAsLinked);
|
||||||
|
destinationAttachments.Add(new Skin.SkinEntry(e.Key.SlotIndex, e.Key.Name, clonedAttachment), clonedAttachment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user