Material Box

Material Box

WEB Design & Material Images

Godot - Toggle TileMap layer visibility

Godot

This shows how to toggle TileMap layer visibility using GDScript in Godot 4.


You can use clear_layer() to delete a tilemap layer and hide it.

clear_layer() has the following features:
- Specifies the ID of the layer to delete
- To show the layer again, use add_layer()

clear_layer(0)

You can use add_layer() to add a layer to the tilemap and show it.

add_layer() has the following features:
- Specifies the ID of the layer to add

add_layer(0)

Godot

TitleGodot - Toggle TileMap layer visibility

CategoryGodot

Created

Update

AuthorYousuke.U