Skip to content

Tilemap destroyLayer() fails with an error #6268

@samme

Description

@samme

Version

  • Phaser Version: 3.60.0-beta.13 and earlier

Description

Call tilemap.destroyLayer(tilemapLayer), passing a layer belonging to the map.

TypeError: layer.destroy is not a function

https://github.com/photonstorm/phaser/blob/23315044f74c27a97c73b2cf64a6e32b41c4b3de/src/tilemaps/Tilemap.js#L1767

Example Test Code

TODO

Additional Information

The layer variable is overwritten with a different value (LayerData).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions