Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tilemap destroyLayer() fails with an error #6268

Closed
samme opened this issue Oct 26, 2022 · 1 comment
Closed

Tilemap destroyLayer() fails with an error #6268

samme opened this issue Oct 26, 2022 · 1 comment

Comments

@samme
Copy link
Contributor

samme commented Oct 26, 2022

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).

@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants