mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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) {
|
foreach (Skin.SkinEntry entry in skinEntries) {
|
||||||
IHasTextureRegion renderableAttachment = entry.Attachment as IHasTextureRegion;
|
IHasTextureRegion renderableAttachment = entry.Attachment as IHasTextureRegion;
|
||||||
if (renderableAttachment != null) {
|
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(
|
renderableAttachment.Region = CloneAtlasRegionWithMaterial(
|
||||||
(AtlasRegion)renderableAttachment.Region, replacementMaterials);
|
(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",
|
"name": "com.esotericsoftware.spine.spine-unity",
|
||||||
"displayName": "spine-unity Runtime",
|
"displayName": "spine-unity Runtime",
|
||||||
"description": "This plugin provides the spine-unity runtime core and examples. Spine Examples can be installed via the Samples tab.",
|
"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",
|
"unity": "2018.3",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Esoteric Software",
|
"name": "Esoteric Software",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user