Skip to content

image after invisible spine isn't drawn #6380

@spayton

Description

@spayton

Version

  • Phaser Version: 3.60, spine 3.8

Description

Place the following in a container: spine1 (drawDebug=true), spine2, image1

you will see both spines and the image, the spine1 will be displaying the debug draw.

now set visible=false on spine2, would expect only spine2 to disapper but the image1 disappears as well.

Example Test Code

go to labs example: here

replace create() with this:

create ()
    {

        let boy1 = this.add.spine(120, 400, 'boy', 'idle', true).setScale(0.5);
        boy1.drawDebug = true;
        let boy2 = this.add.spine(400, 400, 'boy', 'idle', true).setScale(0.5);
        let image1 = this.add.image(200, 450, 'logo').setOrigin(0);

        let container = this.add.container();
        container.add([ boy1, boy2, image1 ]);

        // boy2.visible = false;  // uncomment this to show fault, only 2nd boy should disappear
    }

Additional Information

Roughly, the debug drawing clears the sceneRenderer.batcher.isDrawing, which in turn skips the sceneRenderer.end() & plugin.renderer.pipelines.rebind() in willRender().

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 SpineAn issue arising from the Spine runtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions