I found out, that when I uncheck “Visible” property of a layer of a tilemap it is not considered for collision shape anymore made from this tilemap.
I didn’t find any information about it, so I think this is a bug, because no “visibility” shouldn’t mean that I don’t want collision objects of those shapes.
Simple use-case - I made a level collisions layer, and a decorative level layer and I want only to display decorative layer, but use collisions from level collisions layer. I don’t want it to be in two different tilemaps, because it would complicate editing them. Separating it is useful, because I can create a regular shape (for ex. a 45 degree slope), but in decorative layer use some complicated grass, stairs or something like that, which shape is not good for a platformer character to move on smoothly.
I do not want collisions to be disabled like that, so another property “Collisions enabled for a layer” or something like that is needed.
In the following project you can check the Visible property of layer “collisions” marked and unmarked in tilemap.tilemap.
Empty Project.zip (97.6 KB)