# Class NavGraph Extends IGraphInternals

Base class for all graphs.

## Public Methods

Number of nodes in the graph.

Returns the nearest node to a position using the specified NNConstraint.

Nearest node to a position using the specified NNConstraint.

Calls a delegate with all nodes in the graph.

Calls a delegate with all nodes in the graph until the delegate returns false.

Lower bound on the squared distance from the given point to the closest node in this graph.

Draw gizmos for the graph.

Moves the nodes in this graph.

Scan the graph.

## Public Variables

Enable to draw gizmos in the Unity scene view.

Index of the graph, used for identification purposes.

Used as an ID of the graph, considered to be unique.

Used in the editor to check if the info screen is open.

Default penalty to apply to all nodes.

Name of the graph.

Is the graph open in the editor.

## Private/Protected Members

Throws an exception if it is not safe to update internal graph data right now.

Deserializes graph type specific node data.

Destroys all nodes in the graph.

Cleans up any unmanaged data that the graph has.

Function for cleaning up references.

Called after all deserialization has been done for all graphs.

Internal method to scan the graph.

Serializes graph type specific node data.

True if the graph exists, false if it has been destroyed.

Used in the Unity editor to store serialized settings for graph inspectors.

## Deprecated Members

Returns the nearest node to a position using the specified NNConstraint.

Moves nodes in this graph.

Scan the graph.

Internal method to scan the graph.

Use to set both matrix and inverseMatrix at the same time.

Inverse of **matrix**.

A matrix for translating/rotating/scaling the graph.