Class NavGraph Extends IGraphInternals

Public Abstract

Base class for all graphs.

Public Methods

Number of nodes in the graph.

GetNearest (position, [...])

...

GetNodes (action)

Calls a delegate with all nodes in the graph...

IsInsideBounds (point)

True if the point is inside the bounding box of this graph.

IsPointOnNavmesh (position)

True if the point is on a walkable part of the navmesh, as seen from above.

NearestNodeDistanceSqrLowerBound (position, constraint=null)

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

OnDrawGizmos (gizmos, drawNodes, redrawScope)

Draw gizmos for the graph.

RandomPointOnSurface (nnConstraint, highQuality=true)

A random point on the graph.

RelocateNodes (deltaMatrix)

Moves the nodes in this graph.

Scan ()

Scan the graph.

Snapshot (bounds)

Captures a snapshot of a part of the graph, to allow restoring it later.

Public Variables

active

Reference to the AstarPath object in the scene.

Public
bounds

World bounding box for the graph.

Public
drawGizmos

Enable to draw gizmos in the Unity scene view.

Public
graphIndex

Index of the graph, used for identification purposes.

Public
guid

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

Public
infoScreenOpen

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

Public
initialPenalty

Default penalty to apply to all nodes.

Public
isScanned

True if the graph has been scanned and contains nodes.

Public Abstract
name

Name of the graph.

Public
open

Is the graph open in the editor.

Public
persistent

True if the graph will be included when serializing graph data.

Public
showInInspector

True if the graph should be visible in the editor.

Public

Private/Protected Members

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

DirtyBounds (bounds)

Notifies the system that changes have been made inside these bounds.

DrawUnwalkableNodes (gizmos, size, redrawScope)

...

ScanInternal ([...])

...

SerializedEditorSettings
Private
exists

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

Internal
serializedEditorSettings

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

Private

Deprecated Members

GetNearestForce (position, constraint)

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