文档

Unity Engine

Unity Engine

currentWindowInsets

Provides current window insets for the application.
阅读时间1 分钟最后更新于 21 天前

Definition

public static AndroidWindowInsets currentWindowInsets { get; }

Remarks

The window insets represent the system UI elements, such as the status and navigation bars.
Note: The insets are relative to the activity's frame layout. Querying insets manually through this property is a slow operation

Examples

using UnityEngine;using UnityEngine.Android;public class Controller : MonoBehaviour{ public void Start() { var insets = AndroidApplication.currentWindowInsets; Debug.Log($"NavigationBars visible " + insets.IsVisible(AndroidWindowInsets.Type.NavigationBars)); Debug.Log($"StatusBars visible " + insets.IsVisible(AndroidWindowInsets.Type.StatusBars)); }}