# operator !=(NavNode, NavNode)

> Determines whether two NavNode objects refer to different NavMesh nodes.

## Definition

* **Type:** Operator
* **Namespace:** [Unity.AI.Navigation.LowLevel](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel.md)
* **Assembly:** UnityEngine.AIModule

```csharp
public static bool operator !=(NavNode left, NavNode right)
```

### Parameters

**** (\[NavNode]\(/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode)): The [NavNode](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode.md) on the left side of the operator.**** (\[NavNode]\(/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode)): The NavNode on the right side of the operator.

### Returns

| Type                                                          | Description                                                                                                                                                                       |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the two [NavNode](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode.md) values reference different nodes or differ in null state, `false` otherwise. |

### Remarks

This operator is a syntactic shortcut equivalent to negating the result of [NavNode.Equals](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode/equals.md). Use it inside expressions where the `!=` syntax is more concise than an explicit method call. A null [NavNode](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode.md) is considered different from any non-null one.

Additional Resources: [NavNode.IsNull](/engine/6000.5/script-reference/unity/ai/navigation/lowlevel/navnode/isnull.md)

### Examples

```csharp
using UnityEngine;
using Unity.AI.Navigation.LowLevel;

public class NavNodeNotEqualOperatorExample : MonoBehaviour
{
    public Transform other;

    void Update()
    {
        using NavWorld world = NavWorld.GetDefaultWorld();
        NavLocation a = world.MapLocation(transform.position, Vector3.one, 0);
        NavLocation b = world.MapLocation(other.position, Vector3.one, 0);

        if (a.node != b.node)
            Debug.DrawLine(a.position, b.position, Color.red);
    }
}
```
