Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

Appearance

enumeration

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

Description

Controls the foreground appearance of system bar icons and text.

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.

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); } }

Properties

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