Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetInsetsAppearance(AndroidWindowInsetsType, AndroidWindowInsetsAppearance)

Sets the foreground appearance of the specified inset types at build time.
Read time 1 minuteLast updated 6 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.
Light
uses light icons suitable for dark backgrounds,
Dark
uses dark icons suitable for light backgrounds.
Note: Only supported on Android 11 (API 30) and later. Has no effect on Android 10 (API 29) or earlier versions. AndroidWindowInsetsType.CaptionBar requires Android 15 (API 35) and later for the caption bar to appear. On Android 11 to 14 (API 30 to 34), it has no effect.

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