---
title: costOverride
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/ai/offmeshlink/costoverride
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/ai/offmeshlink/costoverride.md
last_updated: 2026-10-07
generated_at: 2026-11-11T18:32:13.524Z
locale: en-us
---

# costOverride

> Modify pathfinding cost for the link.

## Definition

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

> **Warning:**
>
> **Deprecated.** costOverride has been deprecated together with the class. Declare the object as NavMeshLink and use costModifier instead.

```csharp
public float costOverride { get; set; }
```

### Remarks

When the costOverride value is non-negative the cost of moving over the OffMeshLink is equivalent to the costOverride value times the Euclidean distance between OffMeshLink end points.
