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

error when changing TileMap to TileMapLayer #91504

Closed
jonSP12 opened this issue May 3, 2024 · 2 comments · Fixed by #91760
Closed

error when changing TileMap to TileMapLayer #91504

jonSP12 opened this issue May 3, 2024 · 2 comments · Fixed by #91760
Assignees
Milestone

Comments

@jonSP12
Copy link

jonSP12 commented May 3, 2024

Tested versions

4.3 dev 6

System information

windows 10 vulkan foward+

Issue description

Everything disapears
when changing from tileMap to tileMapLayer

Steps to reproduce

  • add tileMap node
  • place tiles on Fayehs
  • changetype tileMap node to tileMapLayers
scene/2d/tile_map.cpp:415 - Index p_layer = 1 is out of bounds ((int)layers.size() = 1).
scene/2d/tile_map.cpp:139 - Index p_layer = 1 is out of bounds ((int)layers.size() = 1).
scene/2d/tile_map.cpp:415 - Index p_layer = 2 is out of bounds ((int)layers.size() = 1).
scene/2d/tile_map.cpp:139 - Index p_layer = 2 is out of bounds ((int)layers.size() = 1).

Minimal reproduction project (MRP)

tilelayerconvert.zip

@groud
Copy link
Member

groud commented May 9, 2024

Alright, so I opened #91760 to close this issue, which should fix the error message.

However, what you are doing is the wrong way to transform a TileMap into a TileMapLayer. Those are two nodes with a different set of properties, and they don't inherit from one another. So this option cannot work for what you seem to be trying to achieve.

What you should use is this option instead:
Copie d'écran_20240509_142548

@jonSP12
Copy link
Author

jonSP12 commented May 9, 2024

thanks

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