Files
godot-demo-projects/2d/dynamic_tilemap_layers

Dynamic TileMap Layers

Example of how to make a fake wall using TileMap's _tile_data_runtime_update() method. It shows how to disable collisions per layer.

Language: GDScript

Renderer: Compatibility

Check out this demo on the asset library: https://godotengine.org/asset-library/asset/2713

Note

The new TileMapLayer introduced in Godot 4.3 allows disabling collisions for a layer dynamically using a checkbox in the inspector. For earlier Godot versions use the procedure described here.

Screenshots

Screenshot