Displays a set of windows that generate insets on screen.
Use this method to display the system bars, such as the status and navigation bars at runtime.
Additional resources: AndroidApplication.onWindowInsetsChanged, AndroidApplication.currentWindowInsets, Type
using UnityEngine; using UnityEngine.Android;
public class Controller : MonoBehaviour { public void Start() { AndroidApplication.currentWindowInsets.Show(AndroidWindowInsets.Type.NavigationBars | AndroidWindowInsets.Type.StatusBars); } }
| Parameter | Description |
|---|---|
| type | The set of inset types to make visible in the application window. |
| overlapping | The complete set of inset types that should overlap with the application window. |
Shows the specified insets and sets the overlapping mask atomically in a single UI thread dispatch.
The overlapping parameter replaces the entire overlapping mask, it does not accumulate with previous values. For example, calling Show(StatusBars, StatusBars) followed by Show(NavigationBars, NavigationBars) leaves only NavigationBars as overlapping.
using UnityEngine; using UnityEngine.Android;
public class Controller : MonoBehaviour { public void Start() { // Show both bars and make them overlap with the application windw. AndroidApplication.currentWindowInsets.Show( AndroidWindowInsets.Type.StatusBars | AndroidWindowInsets.Type.NavigationBars, AndroidWindowInsets.Type.StatusBars | AndroidWindowInsets.Type.NavigationBars); } }