文档

Unity Engine

Unity Engine

GetOverlapping()

Returns which insets are currently configured to overlap with the application window.
阅读时间1 分钟最后更新于 21 天前

Definition

public AndroidWindowInsets.Type GetOverlapping()

Returns

Type

Description

TypeThe bitmask of inset types that currently overlap with the application window.

Remarks

Returns a bitmask of inset types that are currently overlapping. When an inset is overlapping, the application window extends behind it and Screen.safeArea excludes the area it covers.

Examples

using UnityEngine;using UnityEngine.Android;public class Controller : MonoBehaviour{ public void Start() { var overlapping = AndroidApplication.currentWindowInsets.GetOverlapping(); Debug.Log("Status bar overlapping: " + overlapping.HasFlag(AndroidWindowInsets.Type.StatusBars)); Debug.Log("Navigation bar overlapping: " + overlapping.HasFlag(AndroidWindowInsets.Type.NavigationBars)); }}