Anchors
Related terms: UI scaling, canvas scaler, responsive UI, safe area, automatic layout
UI has to fit many screen shapes. Each element is anchored to a corner, an edge or the center of its parent, and keeps its distance from that anchor. A health bar anchored top-left stays top-left on a phone and on an ultrawide monitor.
UI scaling also grows or shrinks the whole interface with resolution. The safe area keeps it clear of notches and rounded corners.
- Further reading
- Godot Engine: Size and anchors