operator ==(NavQueryBuffer, NavQueryBuffer)
Checks whether two NavQueryBuffer values refer to the same underlying pathfinding buffer.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Operator
- Namespace: Unity.AI.Navigation.LowLevel
- Assembly: UnityEngine.AIModule
public static bool operator ==(NavQueryBuffer left, NavQueryBuffer right)
Parameters
The first NavQueryBuffer to compare.
The second NavQueryBuffer to compare.
Returns
Type | Description |
|---|---|
| bool | |
Remarks
This operator is a syntactic shortcut equivalent to calling NavQueryBuffer.Equals. Use it inside expressions where the syntax is more concise than an explicit method call. The comparison only succeeds when both values point to the same allocation in memory.
==Examples
using Unity.Collections;using UnityEngine;using Unity.AI.Navigation.LowLevel;public class NavQueryBufferEqualOperatorExample : MonoBehaviour{ void Start() { using NavWorld world = NavWorld.GetDefaultWorld(); NavQueryBuffer original = new NavQueryBuffer(world, Allocator.Persistent, 1024); NavQueryBuffer alias = original; if (original == alias) Debug.Log("Both variables alias the same NavQueryBuffer allocation."); original.Dispose(); }}