The Problem: Constant Pixel Size
By default, Unity UI Canvases don’t adapt to different resolutions. If a player runs your game on a 4K monitor, your HUD elements will look microscopic.
The 60-Second Fix
- Select your Canvas object in the Hierarchy.
- Go to the Inspector and find the Canvas Scaler component.
- Change UI Scale Mode to Scale With Screen Size.
- Set the Reference Resolution to 1920 x 1080.
- Set the Match slider value to 0.5.