mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[unity] Fix submesh count regression.
This also fixes tangents not being fully calculated when a skeleton uses no clipping and multiple submeshes.
This commit is contained in:
parent
8131c27440
commit
558a4b5e14
@ -862,12 +862,13 @@ namespace Spine.Unity {
|
|||||||
this.meshBoundsMax = bmax;
|
this.meshBoundsMax = bmax;
|
||||||
this.meshBoundsThickness = lastSlotIndex * settings.zSpacing;
|
this.meshBoundsThickness = lastSlotIndex * settings.zSpacing;
|
||||||
|
|
||||||
|
int submeshInstructionCount = instruction.submeshInstructions.Count;
|
||||||
|
submeshes.Count = submeshInstructionCount;
|
||||||
|
|
||||||
// Add triangles
|
// Add triangles
|
||||||
if (updateTriangles) {
|
if (updateTriangles) {
|
||||||
int submeshInstructionCount = instruction.submeshInstructions.Count;
|
|
||||||
|
|
||||||
// Match submesh buffers count with submeshInstruction count.
|
// Match submesh buffers count with submeshInstruction count.
|
||||||
if (this.submeshes.Count < submeshInstructionCount) {
|
if (this.submeshes.Items.Length < submeshInstructionCount) {
|
||||||
this.submeshes.Resize(submeshInstructionCount);
|
this.submeshes.Resize(submeshInstructionCount);
|
||||||
for (int i = 0, n = submeshInstructionCount; i < n; i++) {
|
for (int i = 0, n = submeshInstructionCount; i < n; i++) {
|
||||||
var submeshBuffer = this.submeshes.Items[i];
|
var submeshBuffer = this.submeshes.Items[i];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user