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

(4.3 Request) Conversion option from Tilemap to TilemapLayer(s) #10340

Closed
MM4096 opened this issue Aug 1, 2024 · 7 comments
Closed

(4.3 Request) Conversion option from Tilemap to TilemapLayer(s) #10340

MM4096 opened this issue Aug 1, 2024 · 7 comments

Comments

@MM4096
Copy link

MM4096 commented Aug 1, 2024

Describe the project you are working on

A 2D game with a lot of tilemaps.

Describe the problem or limitation you are having in your project

4.3 includes the new TilemapLayer node, which should replace Tilemap nodes. However, there is no easy way to change my Tilemap nodes into TilemapLayer nodes.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Give an option to change Tilemap nodes to a group of TilemapLayer nodes.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Firstly, show that Tilemaps are depreciated in the scene view (with a warning symbol, for example), then on right click, give an option that reads something like Convert to TilemapLayer. Clicking this button will give a confirmation prompt warning the user of the potential risks with this conversion. Then, create TilemapLayer nodes in a Node2D container (or similar) with the new Layers containing the same information as the original tilemap. A bonus is keeping the tiles in the previous tilemap in the same locations, although this may be a lot harder.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Probably, with an editor plugin, it just feels better if developers migrating from 4.2.x are able to get around this newly-depreciated feature.

Is there a reason why this should be core and not an add-on in the asset library?

This helps developers ease into the new Tilemap system, instead of manually replacing the objects and replacing tiles.

@KoBeWi
Copy link
Member

KoBeWi commented Aug 2, 2024

The option already exists and is found in the top-right menu:
image

@Calinou
Copy link
Member

Calinou commented Aug 2, 2024

The option already exists and is found in the top-right menu:

I'm curious why the TileMapLayer nodes are generated as a child of the TileMap node, and not as siblings instead (so you can remove the TileMap node easily afterwards).

Also, we might want the TileMap node to be removed automatically after conversion as it's an undoable operation either way.

@KoBeWi
Copy link
Member

KoBeWi commented Aug 2, 2024

TileMapLayers are already children of TileMap, this option makes them non-internal. Also the common workflow is to have a group node as parent of layers, so after converting it's better to change the TileMap type to Node2D.

@Mickeon
Copy link

Mickeon commented Aug 27, 2024

Shouldn't this issue be closed since the option already exists?

@KoBeWi KoBeWi closed this as completed Aug 27, 2024
@KoBeWi KoBeWi added this to the 4.3 milestone Aug 27, 2024
@sesom42
Copy link

sesom42 commented Aug 30, 2024

Unfortunately, the built-in solution does not work with inherited scenes. If you have a TileSet in a parent scene and have drawn tiles from this TileSet in an inherited scene, the TileSetLayers in inherited scenes are empty after the conversion.

@Calinou
Copy link
Member

Calinou commented Aug 31, 2024

Unfortunately, the built-in solution does not work with inherited scenes. If you have a TileSet in a parent scene and have drawn tiles from this TileSet in an inherited scene, the TileSetLayers in inherited scenes are empty after the conversion.

Please open a new issue for this on the main Godot repository, as this sounds like a bug.

@robcbryant
Copy link

Did we open a new issue on this already? I'm seeing the same issue.

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

6 participants