Using drawDebug on a Spine Game Object to view its skeleton would cause the next object in the display list to be skipped for rendering, if it wasn't a Spine Game Object too. This is because the Spine 3 skeleton debug draw ends the spine batch but the Scene Renderer wasn't rebound. Fix #6380

This commit is contained in:
Richard Davey 2023-02-06 16:14:17 +00:00
parent 8aed62c64e
commit 54e7754863

View file

@ -124,9 +124,12 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix
skeleton.x = oldX;
skeleton.y = oldY;
}
if (!renderer.nextTypeMatch)
// The Spine debug draw has reset the batcher, so we need to do this regardless:
sceneRenderer.end();
renderer.pipelines.rebind();
}
else if (!renderer.nextTypeMatch)
{
// The next object in the display list is not a Spine Game Object or Spine Container, so we end the batch
sceneRenderer.end();