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

PlayerSettings.Android.SetInsetsAppearance(AndroidWindowInsetsType types, AndroidWindowInsetsAppearance appearance)

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

Switch to Manual

Parameters

Parameter Description
types The inset types to apply the appearance to. Multiple types can be combined.
appearance The foreground appearance to apply to the specified inset types.

Description

Sets the foreground appearance of the specified inset types at build time.

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.

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