Merge remote-tracking branch 'origin/master'

This commit is contained in:
NathanSweet 2016-04-19 11:17:31 +02:00
commit f42d6afece
3 changed files with 12 additions and 23 deletions

View File

@ -1,3 +1,3 @@
# spine-tk2d
The spine-tk2d runtime has been merged into [spine-unity](https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-unity). You may use spine-unity with [2D Toolkit](http://www.unikronsoftware.com/2dtoolkit/).
The spine-tk2d runtime has been merged into [spine-unity](https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-unity). You may use spine-unity with [2D Toolkit](http://www.2dtoolkit.com/).

View File

@ -119,16 +119,16 @@ namespace Spine.Unity.Modules {
int lastSubmeshInstruction = submeshInstructions.Count - 1;
var currentRenderer = partsRenderers[rendererIndex];
bool skeletonRendererCalculateNormals = skeletonRenderer.calculateNormals;
bool useNormals = skeletonRenderer.calculateNormals;
for (int i = 0, start = 0; i <= lastSubmeshInstruction; i++) {
if (submeshInstructionsItems[i].forceSeparate) {
currentRenderer.RenderParts(instruction.submeshInstructions, start, i + 1);
currentRenderer.MeshGenerator.GenerateNormals = skeletonRendererCalculateNormals;
for (int si = 0, start = 0; si <= lastSubmeshInstruction; si++) {
if (submeshInstructionsItems[si].forceSeparate || si == lastSubmeshInstruction) {
currentRenderer.RenderParts(instruction.submeshInstructions, start, si + 1);
currentRenderer.MeshGenerator.GenerateNormals = useNormals;
if (copyPropertyBlock)
currentRenderer.SetPropertyBlock(block);
start = i + 1;
start = si + 1;
rendererIndex++;
if (rendererIndex < rendererCount) {
currentRenderer = partsRenderers[rendererIndex];
@ -136,26 +136,15 @@ namespace Spine.Unity.Modules {
// Not enough renderers. Skip the rest of the instructions.
break;
}
} else if (i == lastSubmeshInstruction) {
currentRenderer.RenderParts(instruction.submeshInstructions, start, i + 1);
currentRenderer.MeshGenerator.GenerateNormals = skeletonRendererCalculateNormals;
if (copyPropertyBlock)
currentRenderer.SetPropertyBlock(block);
}
}
// If too many renderers. Clear the rest.
rendererIndex++;
if (rendererIndex < rendererCount - 1) {
for (int i = rendererIndex; i < rendererCount; i++) {
currentRenderer = partsRenderers[i];
currentRenderer.ClearMesh();
}
// Clear extra renderers if they exist.
for (; rendererIndex < rendererCount; rendererIndex++) {
partsRenderers[rendererIndex].ClearMesh();
}
}
}
}

View File

@ -4,7 +4,7 @@ The **spine-unity** runtime provides functionality to load, manipulate and rende
For more documentation, see [spine-unity Documentation](https://github.com/pharan/spine-unity-docs/blob/master/README.md).
While spine-unity can render directly with Unity, without the need for any other plugins, it also works with [2D Toolkit](http://www.unikronsoftware.com/2dtoolkit/) and can render skeletons using a TK2D texture atlas.
While spine-unity can render directly with Unity, without the need for any other plugins, it also works with [2D Toolkit](http://www.2dtoolkit.com/) and can render skeletons using a TK2D texture atlas.
## Licensing