# isValid

> Gets whether the distance is valid or not.

## Definition

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

```csharp
public bool isValid { get; set; }
```

### Remarks

When a function returns a [ColliderDistance2D](/engine/6000.6/script-reference/unityengine/colliderdistance2d.md) struct, it may not be valid because the [Collider2D](/engine/6000.6/script-reference/unityengine/collider2d.md) used as distance references were not valid in some way due to them being disabled or not having any valid shapes.  This property indicates whether the other distance properties can be used and are valid or not.

Additional Resources: [Physics2D.Distance](/engine/6000.6/script-reference/unityengine/physics2d/distance.md), [Collider2D.Distance](/engine/6000.6/script-reference/unityengine/collider2d/distance.md) and [Rigidbody2D.Distance](/engine/6000.6/script-reference/unityengine/rigidbody2d/distance.md).
