currentWindowInsets
Provides current window insets for the application.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Property
- Namespace: UnityEngine.Android
- Assembly: UnityEngine.AndroidJNIModule
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
Additional Resources: AndroidApplication.onWindowInsetsChanged.
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)); }}