Replies: 2 comments 2 replies
-
At least, from the documentation, the first one is a var int_data_layer_type = TYPE_INT
var tile_set = TileSet.new()
tile_set.set_custom_data_layer_type(0, int_data_layer_type) |
Beta Was this translation helpful? Give feedback.
-
A general flaw across the entire TileMap API is that the exposed methods are the very same, technical methods used internally, with no regard to general convenience that would benefit the developers. It's complicated to pinpoint exactly, but what you brought up is part of it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
I'm building a dynamic dual grid tilemap system (based on this project) to be used for procedural generation. It's a bit complex, but the way tileset creation is currently implemented makes it even more complex.
Problems
When you create custom data layers for a tileset, you must:
Guess (or print) your way into the index of the data type of the layer as there is (afaik) no enum for it. Godot even warns that an int is used instead of an enum, but the function parameter is an int.I didnt find it obvious what enum is supposed to be used for the custom data layer type, but as stated in a comment below: the enum isVariant.Type
.When you create atlas sources for the tile set, you cant just override a source by setting it. You must check if one exists at that index, remove it, then add the new one at that index.
Discussion
I dont even know if this is the right place to report something like this, but things like this make me want to use another tool. It creates friction and seems to just be an oversight. Please add any other irks about scripting tilemaps below.
Beta Was this translation helpful? Give feedback.
All reactions