> For the complete documentation index, see [llms.txt](https://vc-docs.gitbook.io/engine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vc-docs.gitbook.io/engine/home/doxygen_synced/classes/class_rect_transform.md).

# RectTransform

**Usage:** `api.RectTransform.sizeDelta(rt)`

Wrappers around UnityEngine.RectTransform; get/set pairs are distinguished by arity.

## Public Functions

|         | Name                                                                                                                                                                                                                                                                                        |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Vector2 | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_rect_transform.md#function-sizedelta"><strong>sizeDelta</strong></a>(UnityEngine.RectTransform rt)<br>Gets the rect transform's size delta.</p>                                           |
| void    | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_rect_transform.md#function-sizedelta"><strong>sizeDelta</strong></a>(UnityEngine.RectTransform rt, float w, float h)<br>Sets the rect transform's size delta.</p>                         |
| Vector2 | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_rect_transform.md#function-widthheight"><strong>WidthHeight</strong></a>(UnityEngine.RectTransform rt)<br>Returns the actual rendered rect width/height (rather than the size delta).</p> |
| Vector2 | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_rect_transform.md#function-anchoredposition"><strong>anchoredPosition</strong></a>(UnityEngine.RectTransform rt)<br>Gets the 2D anchored position.</p>                                    |
| void    | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_rect_transform.md#function-anchoredposition"><strong>anchoredPosition</strong></a>(UnityEngine.RectTransform rt, float x, float y)<br>Sets the 2D anchored position.</p>                  |
| Vector2 | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_rect_transform.md#function-anchoredposition3d"><strong>anchoredPosition3D</strong></a>(UnityEngine.RectTransform rt)<br>Gets the 3D anchored position.</p>                                |
| void    | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_rect_transform.md#function-anchoredposition3d"><strong>anchoredPosition3D</strong></a>(UnityEngine.RectTransform rt, float x, float y, float z)<br>Sets the 3D anchored position.</p>     |
| Vector2 | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_rect_transform.md#function-anchormin"><strong>anchorMin</strong></a>(UnityEngine.RectTransform rt)<br>Gets the anchor minimum.</p>                                                        |
| void    | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_rect_transform.md#function-anchormin"><strong>anchorMin</strong></a>(UnityEngine.RectTransform rt, float x, float y)<br>Sets the anchor minimum.</p>                                      |
| Vector2 | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_rect_transform.md#function-anchormax"><strong>anchorMax</strong></a>(UnityEngine.RectTransform rt)<br>Gets the anchor maximum.</p>                                                        |
| void    | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_rect_transform.md#function-anchormax"><strong>anchorMax</strong></a>(UnityEngine.RectTransform rt, float x, float y)<br>Sets the anchor maximum.</p>                                      |

## Public Functions Documentation

### function sizeDelta

```csharp
static Vector2 sizeDelta(
    UnityEngine.RectTransform rt
)
```

Gets the rect transform's size delta.

**Parameters**:

* **rt** The rect transform.

**Return**: Size delta.

### function sizeDelta

```csharp
static void sizeDelta(
    UnityEngine.RectTransform rt,
    float w,
    float h
)
```

Sets the rect transform's size delta.

**Parameters**:

* **rt** The rect transform.
* **w** Width delta.
* **h** Height delta.

### function WidthHeight

```csharp
static Vector2 WidthHeight(
    UnityEngine.RectTransform rt
)
```

Returns the actual rendered rect width/height (rather than the size delta).

**Parameters**:

* **rt** The rect transform.

**Return**: Rendered width/height.

### function anchoredPosition

```csharp
static Vector2 anchoredPosition(
    UnityEngine.RectTransform rt
)
```

Gets the 2D anchored position.

**Parameters**:

* **rt** The rect transform.

**Return**: Anchored position.

### function anchoredPosition

```csharp
static void anchoredPosition(
    UnityEngine.RectTransform rt,
    float x,
    float y
)
```

Sets the 2D anchored position.

**Parameters**:

* **rt** The rect transform.
* **x** X position.
* **y** Y position.

### function anchoredPosition3D

```csharp
static Vector2 anchoredPosition3D(
    UnityEngine.RectTransform rt
)
```

Gets the 3D anchored position.

**Parameters**:

* **rt** The rect transform.

**Return**: 3D anchored position.

### function anchoredPosition3D

```csharp
static void anchoredPosition3D(
    UnityEngine.RectTransform rt,
    float x,
    float y,
    float z
)
```

Sets the 3D anchored position.

**Parameters**:

* **rt** The rect transform.
* **x** X position.
* **y** Y position.
* **z** Z position.

### function anchorMin

```csharp
static Vector2 anchorMin(
    UnityEngine.RectTransform rt
)
```

Gets the anchor minimum.

**Parameters**:

* **rt** The rect transform.

**Return**: Anchor min.

### function anchorMin

```csharp
static void anchorMin(
    UnityEngine.RectTransform rt,
    float x,
    float y
)
```

Sets the anchor minimum.

**Parameters**:

* **rt** The rect transform.
* **x** Anchor min X.
* **y** Anchor min Y.

### function anchorMax

```csharp
static Vector2 anchorMax(
    UnityEngine.RectTransform rt
)
```

Gets the anchor maximum.

**Parameters**:

* **rt** The rect transform.

**Return**: Anchor max.

### function anchorMax

```csharp
static void anchorMax(
    UnityEngine.RectTransform rt,
    float x,
    float y
)
```

Sets the anchor maximum.

**Parameters**:

* **rt** The rect transform.
* **x** Anchor max X.
* **y** Anchor max Y.

***

Updated on 2026-07-22 at 12:00:00 +0800
