CanvasLayer node or Control node for UI container?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ken

Learning game UI, I noticed that some examples use CanvasLayer node as the UI container but some other examples use Control node for the same purpose.

With a little bit of Unity experience, I remember Unity uses the Canvas component which stretches to the entire viewport for UI and it always displays on top of everything. Is CanvasLayer node of Godot is similar to the Canvas component of Unity?

I wonder why some tutorials use Control node as the UI container instead of CanvasLayer node. I noticed that UI under Control node does not always display on top of all contents.
I saw tutorials that use CanvasLayer node for HUD (hp, mp, score, etc…), but others use Control node for start menus (Start, Option, Quit, etc…). is it a common practice in Godot? Is there any reason or use-case to use Control node instead of CanvasLayer node?

:bust_in_silhouette: Reply From: Bernard Cloutier

The point of the CanvasLayer node is to separate your 2D nodes into different rendering layers. You may not have a need for it in your game now, but it’s good practice to place your UI under a CanvasLayer. It allows you, for instance, to specify the layer order (which layer on top of which), and move layers independantly (ex: you have a parallax background on one of your CanvasLayer nodes and you move it by translating the whole layer, or you have a pause menu which “slides down” from the top of the screen when you press pause). Canvas layers — Godot Engine (stable) documentation in English