Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AndroidWindowInsets.SystemBarsBehavior

Options for controlling the behavior of system bars, such as the status and navigation bars.
Read time 1 minuteLast updated 6 days ago

Definition

public enum AndroidWindowInsets.SystemBarsBehavior

Remarks

These options determine how system gestures, such as swiping from screen edges, reveal the system bars when hidden. Use this enum with AndroidWindowInsets.GetSystemBarsBehavior and AndroidWindowInsets.SetSystemBarsBehavior methods to control the system bars behavior for your application window at runtime.

Examples

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

Fields

Value

Description

DefaultReveals the system bars with system gestures, such as swiping from the edge of the screen where the bar is hidden.
ShowTransientBarsBySwipeReveals the system bars temporarily with system gestures, such as swiping from the edge of the screen where the bar is hidden.
UndefinedThe system bars behavior is undefined, for example, when running on unsupported Android versions, API 29 or earlier.