Skip to content

Can not add a layer to another layer. #5595

@tringcooler

Description

@tringcooler

Version

  • Phaser Version: 3.53.1
  • Operating system: win7
  • Browser: chrome

Description

Add a layer to another layer cause an error:
gameObject.removeFromDisplayList is not a function

This method is called at the start of Layer#addChildCallback for reset the displayList.
But, this method is not exist.

Example Test Code

let main_layer = this.scene.add.layer();
let sub_layer = this.scene.make.layer();
main_layer.add(sub_layer);   // <- Error Here

Additional Information

This code is OK in v3.52.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions