mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fixed submeshes.
One day this will work correctly. :(
This commit is contained in:
parent
748431b4f6
commit
64d50d5edc
@ -229,8 +229,10 @@ public class SkeletonComponent : MonoBehaviour {
|
|||||||
|
|
||||||
// Allocate indexes if not the right size, allowing last submesh to have more than required.
|
// Allocate indexes if not the right size, allowing last submesh to have more than required.
|
||||||
int[] indexes = submesh.indexes;
|
int[] indexes = submesh.indexes;
|
||||||
if (lastSubmesh ? (indexes.Length < indexCount) : (indexes.Length != indexCount))
|
if (lastSubmesh ? (indexes.Length < indexCount) : (indexes.Length != indexCount)) {
|
||||||
submesh.indexes = indexes = new int[indexCount];
|
submesh.indexes = indexes = new int[indexCount];
|
||||||
|
submesh.indexCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Set indexes if not already set.
|
// Set indexes if not already set.
|
||||||
if (submesh.firstVertex != vertexIndex || submesh.indexCount < indexCount) {
|
if (submesh.firstVertex != vertexIndex || submesh.indexCount < indexCount) {
|
||||||
|
|||||||
@ -229,8 +229,10 @@ public class SkeletonComponent : MonoBehaviour {
|
|||||||
|
|
||||||
// Allocate indexes if not the right size, allowing last submesh to have more than required.
|
// Allocate indexes if not the right size, allowing last submesh to have more than required.
|
||||||
int[] indexes = submesh.indexes;
|
int[] indexes = submesh.indexes;
|
||||||
if (lastSubmesh ? (indexes.Length < indexCount) : (indexes.Length != indexCount))
|
if (lastSubmesh ? (indexes.Length < indexCount) : (indexes.Length != indexCount)) {
|
||||||
submesh.indexes = indexes = new int[indexCount];
|
submesh.indexes = indexes = new int[indexCount];
|
||||||
|
submesh.indexCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Set indexes if not already set.
|
// Set indexes if not already set.
|
||||||
if (submesh.firstVertex != vertexIndex || submesh.indexCount < indexCount) {
|
if (submesh.firstVertex != vertexIndex || submesh.indexCount < indexCount) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user