mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[unity] Fixed GetRepackedSkin not always working with sequences. See #2268.
This commit is contained in:
parent
5e0bb98fa0
commit
72b2b9c26f
@ -361,12 +361,15 @@ namespace Spine.Unity.AttachmentTools {
|
||||
originalAttachment.Copy();
|
||||
IHasTextureRegion newTextureAttachment = (IHasTextureRegion)newAttachment;
|
||||
AtlasRegion region = newTextureAttachment.Region as AtlasRegion;
|
||||
if (region == null && originalTextureAttachment.Sequence != null)
|
||||
region = (AtlasRegion)originalTextureAttachment.Sequence.Regions[0];
|
||||
|
||||
int existingIndex;
|
||||
if (existingRegions.TryGetValue(region, out existingIndex)) {
|
||||
regionIndices.Add(existingIndex);
|
||||
} else {
|
||||
Sequence originalSequence = originalTextureAttachment.Sequence;
|
||||
existingRegions.Add(region, newRegionIndex);
|
||||
Sequence originalSequence = originalTextureAttachment.Sequence;
|
||||
if (originalSequence != null) {
|
||||
newTextureAttachment.Sequence = new Sequence(originalSequence);
|
||||
for (int i = 0, regionCount = originalSequence.Regions.Length; i < regionCount; ++i) {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "com.esotericsoftware.spine.spine-unity",
|
||||
"displayName": "spine-unity Runtime",
|
||||
"description": "This plugin provides the spine-unity runtime core.",
|
||||
"version": "4.2.36",
|
||||
"version": "4.2.37",
|
||||
"unity": "2018.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user