SetInsetsAppearance(AndroidWindowInsetsType, AndroidWindowInsetsAppearance)
Sets the foreground appearance of the specified inset types at build time.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
public static void SetInsetsAppearance(AndroidWindowInsetsType types, AndroidWindowInsetsAppearance appearance)
Parameters
The inset types to apply the appearance to. Multiple types can be combined.
The foreground appearance to apply to the specified inset types.
Remarks
Use this method to control whether system bar icons appear light or dark for individual inset types. uses light icons suitable for dark backgrounds, uses dark icons suitable for light backgrounds.
LightDarkNote: Only supported on Android 11 (API 30) and later. Has no effect on Android 10 (API 29) or earlier versions.
Examples
using UnityEditor;public class ApplyInsetsAppearance{ public static void Setup() { // Set the status bar to use light icons (for dark backgrounds). PlayerSettings.Android.SetInsetsAppearance(AndroidWindowInsetsType.StatusBars, AndroidWindowInsetsAppearance.Light); // Set the navigation bar to use dark icons (for light backgrounds). PlayerSettings.Android.SetInsetsAppearance(AndroidWindowInsetsType.NavigationBars, AndroidWindowInsetsAppearance.Dark); }}