Skip to content

Commit

Permalink
[unity] Fixed exception when SkeletonRenderSeparator causes null mate…
Browse files Browse the repository at this point in the history
…rial with mask materials. Closes #2499.
  • Loading branch information
HaraldCsaszar committed Apr 11, 2024
1 parent 6adfde3 commit 1274c9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,12 @@ public class SpriteMaskInteractionMaterials {
Material[] originalMaterials = maskMaterials.materialsMaskDisabled;
materialsToFill = new Material[originalMaterials.Length];
for (int i = 0; i < originalMaterials.Length; i++) {
Material newMaterial = new Material(originalMaterials[i]);
Material originalMaterial = originalMaterials[i];
if (originalMaterial == null) {
materialsToFill[i] = null;
continue;
}
Material newMaterial = new Material(originalMaterial);
newMaterial.SetFloat(STENCIL_COMP_PARAM_ID, (int)maskFunction);
materialsToFill[i] = newMaterial;
}
Expand Down
2 changes: 1 addition & 1 deletion spine-unity/Assets/Spine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.1.40",
"version": "4.1.41",
"unity": "2018.3",
"author": {
"name": "Esoteric Software",
Expand Down

0 comments on commit 1274c9c

Please sign in to comment.