Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

AndroidWindowInsets.SetSystemBarsBehavior

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

Declaration

public Void SetSystemBarsBehavior(UnityEngine.Android.AndroidWindowInsets/SystemBarsBehavior behavior);

Description

Controls the behavior of system bars.

This method allows you to configure how the system bars, such as the status and navigation bars, should respond to system gestures in your application.

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

Additional resources: SystemBarsBehavior

using UnityEngine;
using UnityEngine.Android;

public class Controller : MonoBehaviour { public void Start() { AndroidApplication.currentWindowInsets.SetSystemBarsBehavior(AndroidWindowInsets.SystemBarsBehavior.ShowTransientBarsBySwipe); } }