mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-25 22:23:42 +08:00
[unity] Fixed BlendModeMaterials ApplyMaterials ignoring sequence if Region already assigned. Closes #3033.
This commit is contained in:
parent
c3bb4130fe
commit
945be36fea
@ -270,17 +270,18 @@ namespace Spine.Unity {
|
||||
foreach (Skin.SkinEntry entry in skinEntries) {
|
||||
IHasTextureRegion renderableAttachment = entry.Attachment as IHasTextureRegion;
|
||||
if (renderableAttachment != null) {
|
||||
if (renderableAttachment.Region != null) {
|
||||
if (renderableAttachment.Sequence != null) {
|
||||
TextureRegion[] regions = renderableAttachment.Sequence.Regions;
|
||||
for (int i = 0; i < regions.Length; ++i) {
|
||||
regions[i] = CloneAtlasRegionWithMaterial(
|
||||
(AtlasRegion)regions[i], replacementMaterials);
|
||||
}
|
||||
if (regions.Length > 0) {
|
||||
renderableAttachment.Region = regions[0];
|
||||
}
|
||||
} else if (renderableAttachment.Region != null) {
|
||||
renderableAttachment.Region = CloneAtlasRegionWithMaterial(
|
||||
(AtlasRegion)renderableAttachment.Region, replacementMaterials);
|
||||
} else {
|
||||
if (renderableAttachment.Sequence != null) {
|
||||
TextureRegion[] regions = renderableAttachment.Sequence.Regions;
|
||||
for (int i = 0; i < regions.Length; ++i) {
|
||||
regions[i] = CloneAtlasRegionWithMaterial(
|
||||
(AtlasRegion)regions[i], replacementMaterials);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "com.esotericsoftware.spine.spine-unity",
|
||||
"displayName": "spine-unity Runtime",
|
||||
"description": "This plugin provides the spine-unity runtime core and examples. Spine Examples can be installed via the Samples tab.",
|
||||
"version": "4.3.47",
|
||||
"version": "4.3.48",
|
||||
"unity": "2018.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user