# SetInputRegion(GameWindow, Region)

> Sets the input region for the specified window. This is an extension method for GameWindow.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Windowing.EmbeddedLinux](/engine/6000.7/script-reference/unityengine/windowing/embeddedlinux.md)
* **Assembly:** UnityEngine.EmbeddedLinuxWindowingModule

```csharp
public static AsyncOperation SetInputRegion(this GameWindow window, Region region)
```

### Parameters

**** (\[GameWindow]\(/engine/6000.7/script-reference/unityengine/windowing/gamewindow)): The [GameWindow](/engine/6000.7/script-reference/unityengine/windowing/gamewindow.md) instance this extension method is implicitly called on.**** (\[Region]\(/engine/6000.7/script-reference/unityengine/windowing/region)): A [Region](/engine/6000.7/script-reference/unityengine/windowing/region.md) struct containing lists of rectangular areas to include and exclude from input.

### Returns

| Type                                                                            | Description                                                                                      |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| [AsyncOperation](/engine/6000.7/script-reference/unityengine/asyncoperation.md) | An AsyncOperation that can be used to track the completion of the input region update operation. |

### Remarks

This method allows you to define which areas of the window should receive input events and which areas should be excluded. This is useful for creating custom input handling behavior in EmbeddedLinux (Wayland) environments.

**Notes**:

* This method is asynchronous and returns an `AsyncOperation` that you can use to track the completion of the operation.

* The `Region` parameter contains two lists of rectangles: one for inclusion regions and another for exclusion regions. The system adds the inclusions first, then subtracts the exclusions in that order.

* Calling this method replaces any previously set input regions for the specified `GameWindow`.

* This method is available only on EmbeddedLinux platforms with Wayland support.

### Examples

```csharp
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Windowing;
using UnityEngine.Windowing.EmbeddedLinux;

public class WindowingInputRegionsExample : MonoBehaviour
{
    void Start()
    {
        Region region = new Region()
        {
            // rectangles to include for input
            inclusions = new List<RectInt>() { new RectInt(0, 0, 300, 300), new RectInt(250, 250, 150, 150) },
            // rectangles to exclude from input
            exclusions = new List<RectInt>() { new RectInt(100, 0, 200, 200), new RectInt(250, 250, 50, 50) }
        };

        var op = GameWindow.Main.SetInputRegion(region);

        op.completed += _ => {
            Debug.Log($"Input regions set for {GameWindow.Main.GetTitle()}");
        };
    }
}
```
