We see four kinds of objects when playing a game:
- GameObjects that have some visual elements, such as 2D and 3D objects.
- UI elements located in World Space, so they appear next to GameObjects in the scene.
- UI elements located in Screen Space - Camera, so they appear at a fixed distance from the camera (but can be obscured by GameObjects closer to the camera than these UI elements).
- UI elements located in Screen Space - Overlay. These always appear above the other three kinds of visual element, and are perfect for Head Up Display (HUD) elements, such as inventories.
Sometimes we want to visually make it clear which elements are part of the UI HUD and which are visual objects in the scene. Unity UI Panels with an opaque or translucent background image are a simple and effective way to achieve this.
Panels...