Unity allows you to control the visibility of Android system bars and configure how they respond to gestures such as swiping from the screen edges. The Android system bar visibility determines how your application utilizes the available screen space to display its content.
The Android system bars are Android system UI elements that generate window insets when visible. Window insets define the screen area these UI elements occupy, restricting your application to use the remaining available screen space. The Android system bars include:
You can control the Android system bars through the Insets section in the Android Player settingsSettings that let you set various player-specific options for the final game built by Unity. More info
See in Glossary.
Note: On Android versions earlier than 15, the Render Outside Safe Area Player setting determines whether the full available screen space includes the area around physical display cutouts. On Android 15 and later, the Android operating system allows application content to extend over the display cutouts. However, in this case the application content cannot use the screen area Android system bars occupy when visible.
To configure Android system bars, follow these steps:
Your application now hides the selected Android system bars and uses the available screen space.
The selected System Bars Behavior option controls how Android system bars respond to system gestures. The available dropdown options allow you display the system bars temporarily in a transparent format or keep displaying the system bars until they’re manually hidden again using AndroidWindowInsets.Hide.
Note: The Hide Navigation Bar Player setting is obsolete in new projects created using Unity versions 6000.5 and later. For existing projects with this setting enabled, the navigation bar remains disabled by default.
Use the AndroidApplication class methods to access Android system bars information.
Note: The onWindowInsetsChanged callback and the System Bars Behavior are supported on Android 11 (API 30) or later versions. On older devices, you need to detect changes in the insets manually. These devices always return undefined when detecting the current Android system bar behavior.