# GetBrushOffset(int, int)

> Gets the brush offset within the brush bounds.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.TerrainTools](/engine/6000.5/script-reference/unityeditor/terraintools.md)
* **Assembly:** UnityEditor

```csharp
public Vector2Int GetBrushOffset(int xPos, int yPos)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The x position within brush bounds.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The y position within brush bounds.

### Returns

| Type                                                                    | Description               |
| ----------------------------------------------------------------------- | ------------------------- |
| [Vector2Int](/engine/6000.5/script-reference/unityengine/vector2int.md) | Returns the brush offset. |
