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:
- In the Unity Editor, go to Edit > > Player > Android.Project Settings
?
- In the Resolution and Presentation section, locate System Bars.
- In the System Bars section, enable Visible for the system bar you want to display on screen.
- Enable Overlapping to render your application content behind the visible system bar.
- Set the Appearance setting for that system bar so its icons and text are legible against your application content.
- 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 class. This class provides methods to configure system bar visibility, overlapping, appearance, background transparency, and gesture behavior at runtime.
AndroidWindowInsetsUse the class methods to access current Android system bars information.
AndroidApplication- The property provides current Android system bars visibility and behavior status.
currentWindowInsets - The event allows you to detect and handle any changes in the visibility and behavior at runtime.
onWindowInsetsChanged