---
title: GetWeight(Vector2, float)
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityeditor/terraintools/terrainregion/getweight
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityeditor/terraintools/terrainregion/getweight.md
last_updated: 2026-10-20
generated_at: 2026-11-12T05:30:34.264Z
locale: en-us
---

# GetWeight(Vector2, float)

> Gets how strongly an edit of this region applies at a position.

## Definition

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

```csharp
public float GetWeight(Vector2 position, float falloff)
```

### Parameters

**** (\[Vector2]\(/engine/7000.0/script-reference/unityengine/vector2)): The position in meters.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The fraction of the region, from 0 to 1, over which the weight fades at its edge. 0 gives a hard edge.

### Returns

| Type                                                          | Description              |
| ------------------------------------------------------------- | ------------------------ |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The weight, from 0 to 1. |

### Remarks

The weight is 1 inside the region and 0 outside it. With a falloff, it fades smoothly (smoothstep) from 1 to 0 towards the edge of the region, over that fraction of the half size of a rectangle, the radius of a disc, or the half width of a corridor.
