# Validate()

> Rebuild the polygon from its vertices.

## Definition

* **Type:** Method
* **Namespace:** [Unity.U2D.Physics](/engine/6000.7/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public readonly PolygonGeometry Validate()
```

### Returns

| Type                                                                                    | Description                                                                                                                                                         |
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [PolygonGeometry](/engine/6000.7/script-reference/unity/u2d/physics/polygongeometry.md) | The rebuilt polygon, or an empty geometry when it cannot be rebuilt. See [\_isValid](/engine/6000.7/script-reference/unity/u2d/physics/polygongeometry/isvalid.md). |

### Remarks

The normals and the centroid are calculated from the vertices, replacing whatever they were set to, and the radius is kept as it is. They must still be finite to begin with, along with the radius and every vertex, because a non-finite value stops the rebuild rather than being replaced. The vertices are replaced by the convex hull of themselves, so a vertex that is concave, duplicated or too close to its neighbor is welded away or dropped. The result can therefore have fewer vertices than the geometry it was rebuilt from.
