diff --git a/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/AtlasUtilities.cs b/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/AtlasUtilities.cs index 4aa838e96..063f69675 100644 --- a/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/AtlasUtilities.cs +++ b/spine-unity/Assets/Spine/Runtime/spine-unity/Utility/AtlasUtilities.cs @@ -233,6 +233,7 @@ namespace Spine.Unity.AttachmentTools { static readonly List originalRegions = new List(); static readonly List repackedRegions = new List(); static List[] texturesToPackAtParam = new List[1]; + static List inoutAttachments = new List(); /// /// Fills the outputAttachments list with new attachment objects based on the attachments in sourceAttachments, @@ -489,9 +490,7 @@ namespace Spine.Unity.AttachmentTools { newSkin.bones.AddRange(o.bones); newSkin.constraints.AddRange(o.constraints); - var originalAttachments = o.Attachments; - int attachmentCount = originalAttachments.Count; - List inoutAttachments = new List(attachmentCount); + inoutAttachments.Clear(); foreach (var entry in o.Attachments) { inoutAttachments.Add(entry.attachment); }