From 54e77548631ea13e19029687c0b3e9ad9195a5d9 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 6 Feb 2023 16:14:17 +0000 Subject: [PATCH] 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 --- .../spine/src/gameobject/SpineGameObjectWebGLRenderer.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js index 14b2b8040..770e72042 100644 --- a/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js +++ b/plugins/spine/src/gameobject/SpineGameObjectWebGLRenderer.js @@ -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();