GetAppearance(Type)
Returns the current foreground appearance of the specified inset type.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Android
- Assembly: UnityEngine.AndroidJNIModule
public AndroidWindowInsets.Appearance GetAppearance(AndroidWindowInsets.Type type)
Parameters
A single inset type to query. Passing combined flags throws an ArgumentException.
Returns
Type | Description |
|---|---|
| Appearance | The current appearance, either |
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 for AndroidWindowInsets.Type.None.
LightNote: Only supported on Android 11 (API 30) or later. Reports for AndroidWindowInsets.Type.CaptionBar on Android 11 to 14 (API 30 to 34), because caption bar appearance requires Android 15 (API 35) or later.
LightExamples
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); }}