Class NavGraph Extends IGraphInternals

Public Abstract

Base class for all graphs.

Public Methods

CountNodes ()

Number of nodes in the graph.

Public
GetNearest (position)

Returns the nearest node to a position.

Public
GetNearest (position, constraint)

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

Public
GetNearest (position, constraint, hint)

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

Public
GetNearestForce (position, constraint)

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

Public
GetNodes (action)

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

Public
GetNodes (action)

Calls a delegate with all nodes in the graph.

Public Abstract
OnDrawGizmos (gizmos, drawNodes)

Draw gizmos for the graph.

Public
RelocateNodes (deltaMatrix)

Moves the nodes in this graph.

Public
Scan ()

Scan the graph.

Public

Public Variables

active

Reference to the AstarPath object in the scene.

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
name

Name of the graph.

Public
open

Is the graph open in the editor.

Public

Private/Protected Members

DeserializeExtraInfo (ctx)
Private
DeserializeExtraInfo (ctx)

Deserializes graph type specific node data.

Protected
DeserializeSettingsCompatibility (ctx)
Private
DestroyAllNodes ()

Destroys all nodes in the graph.

Protected
DestroyAllNodes ()
Private
DrawUnwalkableNodes (size)
Protected
exists

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

Package
OnDestroy ()

Function for cleaning up references.

Protected
OnDestroy ()
Private
PostDeserialization (ctx)

Called after all deserialization has been done for all graphs.

Protected
PostDeserialization (ctx)
Private
ScanInternal ()

Internal method to scan the graph.

Protected Abstract
ScanInternal ()
Private
serializedEditorSettings

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

Private
SerializedEditorSettings
Private
SerializeExtraInfo (ctx)

Serializes graph type specific node data.

Protected
SerializeExtraInfo (ctx)
Private

Deprecated Members

DeserializeSettingsCompatibility (ctx)

An old format for serializing settings.

Protected
inverseMatrix

Inverse of matrix.

Public
matrix

A matrix for translating/rotating/scaling the graph.

Public
RelocateNodes (oldMatrix, newMatrix)

Moves nodes in this graph.

Public
ScanGraph ()

Scan the graph.

Public
SetMatrix (m)

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

Public