# center

> The position of the center of the rectangle.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.5/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public Vector2 center { readonly get; set; }
```

### Examples

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    void Start()
    {
        Rect rect = new Rect(0, 0, 100, 100);
        print(rect.center);
        rect.center = new Vector2(50, 50);
    }
}
```
