Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Configure edge-to-edge rendering

Control the visibility of Android system bars, adjust their appearance and background, and extend your application content behind them for edge-to-edge rendering.
Read time 2 minutesLast updated 14 days ago

Control the visibility of Android system bars, adjust their appearance and background, and extend your application content behind them for edge-to-edge rendering. Configuring these options determines how your application utilizes the available device screen space.

Configure edge-to-edge rendering with system bars

To configure edge-to-edge rendering, follow these steps:
  1. In the Unity Editor, go to Edit >
    Project Settings

    ?

    > Player > Android.
  2. In the Resolution and Presentation section, locate System Bars.
  3. In the System Bars section, enable Visible for the system bar you want to display on screen.
  4. Enable Overlapping to render your application content behind the visible system bar.
  5. Set the Appearance setting for that system bar so its icons and text are legible against your application content.
  6. In the Background dropdown, select Transparent so your application content displays through the bar.
Your application content now extends behind the system bars you configured for edge-to-edge rendering.
Notes:
  • The Visible setting for the Navigation Bars replaces the deprecated Hide Navigation Bar Player setting. For existing projects with Hide Navigation Bar enabled, Visible for the Navigation Bars is disabled by default.
  • The Overlapping, Appearance, and Background settings require Android 11 (API level 30) or later versions. These settings have no effect on Android 10 (API level 29) and earlier versions.
  • The Behavior dropdown controls how a hidden system bar responds when the user swipes from the screen edge. The system bar can reappear temporarily and transparently or stays visible until you hide it again using
    AndroidWindowInsets.Hide
    .

Control system bars at runtime

To control system bars dynamically while your application is running, use the
AndroidWindowInsets
class. This class provides methods to configure system bar visibility, overlapping, appearance, background transparency, and gesture behavior at runtime.
Use the
AndroidApplication
class methods to access current Android system bars information.
  • The
    currentWindowInsets
    property provides current Android system bars visibility and behavior status.
  • The
    onWindowInsetsChanged
    event allows you to detect and handle any changes in the visibility and behavior at runtime.
Note
The
onWindowInsetsChanged
callback is 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.

Additional resources