Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

PlayerSettings.Android.requestedOverlappingInsets

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual
public static AndroidWindowInsetsType requestedOverlappingInsets;

Description

Requests which insets should overlap with the application window when the application starts.

Use this property to enable edge-to-edge rendering by allowing the application window to extend behind system bars. When an inset is overlapping, the application window isn't resized to avoid it, and Screen.safeArea excludes the area covered by the overlapping inset.

Note: Only supported on Android 11 (API 30) and later. Has no effect on Android 10 (API 29) or earlier versions.

Additional resources: AndroidWindowInsetsType, Screen.safeArea.

using UnityEditor;

public class ApplyOverlappingInsets { public static void Setup() { // Allow the application window to extend behind both status and navigation bars. PlayerSettings.Android.requestedOverlappingInsets = AndroidWindowInsetsType.StatusBars | AndroidWindowInsetsType.NavigationBars; } }