Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetAppearance(Type)

Returns the current foreground appearance of the specified inset type.
Read time 1 minuteLast updated 5 days ago

Definition

public AndroidWindowInsets.Appearance GetAppearance(AndroidWindowInsets.Type type)

Parameters

type

A single inset type to query. Passing combined flags throws an ArgumentException.

Returns

Type

Description

AppearanceThe current appearance, either
Light
or
Dark
.

Remarks

Returns whether the specified inset type currently has light or dark icons. Only a single inset type may be passed; passing combined flags throws an ArgumentException. Returns
Light
for AndroidWindowInsets.Type.None.
Note: Only supported on Android 11 (API 30) or later. Reports
Light
for AndroidWindowInsets.Type.CaptionBar on Android 11 to 14 (API 30 to 34), because caption bar appearance requires Android 15 (API 35) or later.

Examples

using UnityEngine;using UnityEngine.Android;public class Controller : MonoBehaviour{ public void Start() { var appearance = AndroidApplication.currentWindowInsets.GetAppearance(AndroidWindowInsets.Type.StatusBars); Debug.Log("Status bar appearance: " + appearance); }}