# center

> The center of the obstacle, measured in the object's local space.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine.AI](/engine/6000.3/script-reference/unityengine/ai.md)
* **Assembly:** UnityEngine.AIModule

```csharp
public Vector3 center { get; set; }
```

### Remarks

**Note:** When a [NavMeshObstacle](/engine/6000.3/script-reference/unityengine/ai/navmeshobstacle.md) is created the [NavMeshObstacle.center](/engine/6000.3/script-reference/unityengine/ai/navmeshobstacle/center.md) is set to zero.

### Examples

```csharp
// Default center is (0, 0, 0)
using UnityEngine;
using UnityEngine.AI;

public class ExampleScript : MonoBehaviour
{
    void Start()
    {
        NavMeshObstacle navMeshObstacle = gameObject.AddComponent<NavMeshObstacle>();
        Debug.Log(navMeshObstacle.center);
    }
}
```
