# GetBounds(Type)

> Returns the screen-space rectangle where an overlapping inset covers the application window.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Android](/engine/6000.7/script-reference/unityengine/android.md)
* **Assembly:** UnityEngine.AndroidJNIModule

```csharp
public Rect GetBounds(AndroidWindowInsets.Type type)
```

### Parameters

**** (\[Type]\(/engine/6000.7/script-reference/unityengine/android/androidwindowinsets/type)): A single inset type to query. Passing combined flags throws an ArgumentException.

### Returns

| Type                                                        | Description                                                                                                                                                                                  |
| ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Rect](/engine/6000.7/script-reference/unityengine/rect.md) | The screen-space rectangle where the overlapping inset covers the application window, or [\_zero](/engine/6000.7/script-reference/unityengine/rect/zero.md) if the inset is not overlapping. |

### Remarks

Returns the bounds in Unity screen coordinates (origin bottom-left, y-up), matching the coordinate system of [\_safeArea](/engine/6000.7/script-reference/unityengine/screen/safearea.md). Returns [\_zero](/engine/6000.7/script-reference/unityengine/rect/zero.md) if the specified inset is not overlapping or if [AndroidWindowInsets.Type.None](/engine/6000.7/script-reference/unityengine/android/androidwindowinsets/type/none.md) is passed. Only a single inset type may be passed; passing combined flags throws an ArgumentException.

The returned rect accounts for resolution scaling when [Screen.SetResolution](/engine/6000.7/script-reference/unityengine/screen/setresolution.md) is used.

### Examples

```csharp
using UnityEngine;
using UnityEngine.Android;

public class Controller : MonoBehaviour
{
    public void Update()
    {
        var statusBarBounds = AndroidApplication.currentWindowInsets.GetBounds(AndroidWindowInsets.Type.StatusBars);
        if (statusBarBounds.width > 0)
            Debug.Log("Status bar covers: " + statusBarBounds);
    }
}
```
