# safeArea

> Returns the safe area of the screen in pixels (Read Only).

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/7000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static Rect safeArea { get; }
```

### Remarks

On some displays, certain areas of the screen might not be visible to the user. This might be because the display's shape is non-rectangular or in the case of TV displays, it can be caused by overscan. Avoid placing user interface elements in areas outside the safe area rectangle. The maximum size of the safe area is the screen resolution in pixels and is defined as `Rect(0, 0, Screen.width, Screen.height)`.

**Note:** `Screen.safeArea` is relative to the application window, not the physical device screen. On Android 14 (API level 34) and earlier, if [PlayerSettings.Android.renderOutsideSafeArea](/engine/7000.0/script-reference/unityeditor/playersettings/android/renderoutsidesafearea.md) is disabled, Unity resizes the application window to fit the device safe area. The returned [Rect](/engine/7000.0/script-reference/unityengine/rect.md) typically equals `Rect(0, 0, Screen.width, Screen.height)`, because the window no longer includes unsafe regions.

**Note:** On Android 15 (API level 35) and later, [PlayerSettings.Android.renderOutsideSafeArea](/engine/7000.0/script-reference/unityeditor/playersettings/android/renderoutsidesafearea.md) has no effect. The application always renders into the display cutout (notch) area, so `Screen.safeArea` excludes it. Use `Screen.safeArea` to position important and interactive user interface elements.

**Note:** On Android, the status bar and the navigation bar also affect `Screen.safeArea`. Neither bar overlaps the application by default, so Android insets the application window to clear them and `Screen.safeArea` doesn't account for them. If you set a bar to overlap, the application renders behind it and `Screen.safeArea` excludes that area as well. To control this, use [AndroidWindowInsets.SetOverlapping](/engine/7000.0/script-reference/unityengine/android/androidwindowinsets/setoverlapping.md) at run time, or the **Status Bars** and **Navigation Bars** options in the Android Player settings.

**Note:** The origin of the safe area is located at the bottom-left corner of the screen. Therefore, if you intend to use `Screen.safeArea` or [Screen.cutouts](/engine/7000.0/script-reference/unityengine/screen/cutouts.md) with a UI system like [UI Toolkit](/engine/7000.0/script-reference/unityengine/uielements.md), where origin is at the top-left corner, you must invert the coordinates. The following code snippet demonstrates how to do that:

`var safeAreaForUIToolkit = new Rect(Screen.safeArea.x, Screen.height - Screen.safeArea.y, Screen.safeArea.width, Screen.safeArea.height);`

The following image depicts how the safe area and cutouts appear on Google Pixel 7 Pro (API 35) in portrait and landscape modes. The green area is the safe area, while the red area is a cutout.

![Android GooglePixel7Pro API35 (safeArea)](/api/media?file=/engine/7000.0/media/images/Android_GooglePixel7Pro_API35.png)

\\

Safe area and cutouts on Google Pixel 7 Pro (API 35) in portrait and landscape modes
