Safe Area component
When this component is added to a Game Object, its Rect Transform is set to take into account the system UI for each device.
The Safe Area component has three different placements that can be chosen based on the value of the Scope
property.
- Legacy
- This option is for compatibility reasons and is not recommended for use with newly created
Player Local UI
s. - Mainly on mobile devices, this is a
Safe Area
that does not overlap with the basic movement UI, and is placed away from the bottom, left and right sides of the screen.Scope
will be treated as Legacy in worlds uploaded with a version of Creator Kit that does not have theScope
option.- The range of this safe area is the same as the safe area of the
Player Local UI
uploaded with a version of Creator Kit that does not have theScope
option.
- This option is for compatibility reasons and is not recommended for use with newly created
- System
- The Rect Transform is set to a position that takes into account the system UI.
- The sides are sized so as not to overlap the menu open/close toggle, and the bottom is the same size as the Device.
- Device
- The Rect Transform is set to a position that reflects the safe area size specific to each device.
- The device safe area does not include any rounded corners or notches on the device screen.
- This type allows you to place the UI so that it overlaps the system UI.
- The Rect Transform is set to a position that reflects the safe area size specific to each device.
The image shows the difference in safe areas per Scope
.
The size of the safe area changes depending on the Legacy (green), System (red), or Device (yellow) option (actually varies depending on the device).
By positioning UI elements relative to the Rect Transform of Game Objects with this component, they can be displayed in device-appropriate locations. For Unity UI positioning, also refer to Basic Layout.
You can also automatically set child object positioning by pressing the Auto Set Anchor button.
This component must be a child of Player Local UI to function correctly.