mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 16:48:43 +08:00
[unity] Applied similar optimizing changes to 3.8 commit 3fdbf9a0 (changing new List<> allocation to shared static instance).
This commit is contained in:
parent
bcca63f8f8
commit
3f9577b5ac
@ -233,6 +233,7 @@ namespace Spine.Unity.AttachmentTools {
|
||||
static readonly List<AtlasRegion> originalRegions = new List<AtlasRegion>();
|
||||
static readonly List<AtlasRegion> repackedRegions = new List<AtlasRegion>();
|
||||
static List<Texture2D>[] texturesToPackAtParam = new List<Texture2D>[1];
|
||||
static List<Attachment> inoutAttachments = new List<Attachment>();
|
||||
|
||||
/// <summary>
|
||||
/// 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<Attachment> inoutAttachments = new List<Attachment>(attachmentCount);
|
||||
inoutAttachments.Clear();
|
||||
foreach (var entry in o.Attachments) {
|
||||
inoutAttachments.Add(entry.attachment);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user