# Class NavMeshGraph Extends NavmeshBase, IUpdatableGraph

Generates graphs based on navmeshes.

Navmeshes are meshes in which each triangle defines a walkable area. These are great because the AI can get so much more information on how it can walk. Polygons instead of points mean that the FunnelModifier can produce really nice looking paths, and the graphs are also really fast to search and have a low memory footprint because fewer nodes are usually needed to describe the same area compared to grid graphs.

The navmesh graph requires that you create a navmesh manually. The package also has support for generating navmeshes automatically using the RecastGraph.

For a tutorial on how to configure a navmesh graph, take a look at Using navmeshes.

## Inner Types

## Public Methods

Returns a new transform which transforms graph space to world space.

## Public Static Methods

## Public Variables

Offset in world space.

Determines how normals are calculated.

Rotation in degrees.

Scale of the graph.

Mesh to construct navmesh from.

## Inherited Public Members

Number of nodes in the graph.

End batch updating of tiles.

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 until the delegate returns false.

Calls a delegate with all nodes in the graph.

Tile at the specified x, z coordinate pair.

Returns a bounds object with the bounding box of a group of tiles.

Returns a bounds object with the bounding box of a group of tiles.

Returns an XZ bounds object with the bounds of a group of tiles in graph space.

Tile coordinates from a tile index.

Returns the tile coordinate which contains the specified **position**.

Tile index from a vertex index.

All tiles.

Returns a rect containing the indices of all tiles touching the specified bounds.

Returns a rect containing the indices of all tiles touching the specified bounds.

Returns a rect containing the indices of all tiles by rounding the specified bounds to tile borders.

Vertex coordinate for the specified vertex index.

Vertex coordinate in graph space for the specified vertex index.

Returns if there is an obstacle between **origin** and **end** on the graph.

Returns if there is an obstacle between **origin** and **end** on the graph.

Returns if there is an obstacle between **origin** and **end** on the graph.

Returns if there is an obstacle between **origin** and **end** on the graph.

Returns if there is an obstacle between **origin** and **end** on the graph.

Returns if there is an obstacle between **origin** and **end** on the graph.

Returns if there is an obstacle between **origin** and **end** on the graph.

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

Draw gizmos for the graph.

Called when tiles have been completely recalculated.

Finds the first node which contains **position**.

Moves the nodes in this graph.

Moves the nodes in this graph.

Replace tile at index with nodes created from specified navmesh.

Scan the graph.

Start batch updating of tiles.

Enable to draw gizmos in the Unity scene view.

Should navmesh cuts affect this graph.

Size of the bounding box.

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.

Show an outline of the polygons in the Unity Editor.

Show the surface of the navmesh.

Show the connections between the polygons in the Unity Editor.

Number of tiles along the X-axis.

Number of tiles along the Z-axis.

Determines how the graph transforms graph space to world space.

## Private/Protected Members

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

Clear the tile at the specified coordinate.

Generate connections between the two tiles.

Create connections between all nodes.

Deserializes graph type specific node data.

Destroys all nodes in the graph.

Cleans up any unmanaged data that the graph has.

Fills graph with tiles created by NewEmptyTile.

Creates a single new empty tile.

Function for cleaning up references.

Called after all deserialization has been done for all graphs.

Internal method to scan the graph.

Serializes Node Info.

May be called on the Unity thread before starting the update.

May be called on the Unity thread after executing the update.

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

Handles navmesh cutting.

All tiles.