EsotericSoftware / spine-runtimes

2D skeletal animation runtimes for Spine.
http://esotericsoftware.com/
Other
4.43k stars 2.92k forks source link

[unity] Immutable Triangles has no effect by default #2636

Open HaraldCsaszar opened 2 months ago

HaraldCsaszar commented 2 months ago

Reported on the forum here: https://esotericsoftware.com/forum/d/26850-question-about-the-spine_trianglecheck-/7

When the define SPINE_TRIANGLECHECK is active (the default), immutableTriangles has no effect.

Fix: Correct the line ~154 in SkeletonRendererInstruction.cs GeometryNotEqual to:

if (a.immutableTriangles != b.immutableTriangles) return true;
if (a.immutableTriangles) return false; // newly added line

and move this block further up, below if (a.hasActiveClipping || b.hasActiveClipping) return true;. As this is a breaking change, apply this patch in next beta (4.3-beta).

HaraldCsaszar commented 2 months ago

SkeletonRendererInstruction-fix-immutable-2636.zip