Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AndroidWindowInsets.Appearance

Controls the foreground appearance of system bar icons and text.
Read time 1 minuteLast updated 6 days ago

Definition

public enum AndroidWindowInsets.Appearance

Remarks

Use this enum with AndroidWindowInsets.SetAppearance and AndroidWindowInsets.GetAppearance to control the appearance of system bar icons per inset type at runtime. Requires Android 11 (API 30) and later.

Examples

using UnityEngine;using UnityEngine.Android;public class Controller : MonoBehaviour{ public void Start() { var insets = AndroidApplication.currentWindowInsets; // Light icons on the status bar (suitable for dark game backgrounds). insets.SetAppearance(AndroidWindowInsets.Type.StatusBars, AndroidWindowInsets.Appearance.Light); // Dark icons on the navigation bar (suitable for light game backgrounds). insets.SetAppearance(AndroidWindowInsets.Type.NavigationBars, AndroidWindowInsets.Appearance.Dark); // You can also pass multiple inset types to set the same appearance for all of them. insets.SetAppearance(AndroidWindowInsets.Type.StatusBars | AndroidWindowInsets.Type.NavigationBars, AndroidWindowInsets.Appearance.Light); }}

Fields

Value

Description

DarkDark icons, suitable for light backgrounds behind the system bars.
LightLight icons, suitable for dark backgrounds behind the system bars.