How do you avoid Tilemaps from covering the UI, and other nodes

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By lavaduder
:warning: Old Version Published before Godot 3 was released.

If i put a tilemap into my scene, the UI (Autoloaded), or what ever node is added to the scene tree (via get_tree().get_root().add_child(Object)) Does not show.

How do you avoid this?

you can set the Z axis to something other than 0(assuming you are on 2D)

rustyStriker | 2018-01-12 22:26

:bust_in_silhouette: Reply From: mateusak

The proper manner would be using a CanvasLayer, and putting your entire UI inside it. That way it’ll always be on camera and above everything.

About other nodes, though; the bottom-most node is always rendered first, and the top-most is always rendered last. If you put your TileMap as the top-most node of your root, or even make the root itself a TileMap, other nodes won’t be covered.