Class LevelGridNode Extends GridNodeBase

Public

Describes a single node for the LayerGridGraph.

Works almost the same as a grid node, except that it also stores to which layer the connections go to

Public Methods

AddConnection (node, cost)

Add a connection from this node to the specified node.

Public
ClearConnections (alsoReverse)

Remove all connections from this node.

Public
ClosestPointOnNode (p)

Closest point on the surface of this node to the point p.

Public
DeserializeNode (ctx)

Deserializes the node data from a byte array.

Public
GetConnectionValue (dir)

Which layer a grid connection goes to.

Public
GetConnections (action)

Calls the delegate with all connections from this node.

Public
GetGizmoHashCode ()

Hash code used for checking if the gizmos need to be updated.

Public
GetNeighbourAlongDirection (direction)

Adjacent grid node in the specified direction.

Public
GetPortal (other, left, right, backwards)

Add a portal from this node to the specified node.

Public
HasConnectionInDirection (direction)

True if the node has a connection to an adjecent node in the specified direction.

Public
LevelGridNode ()
Public
LevelGridNode (astar)
Public
Open (path, pathNode, handler)

Open the node.

Public
RemoveConnection (node)

Removes any connection from this node to the specified node.

Public
ResetConnectionsInternal ()

Removes all grid connections from this node.

Public
SerializeNode (ctx)

Serialized the node data to a byte array.

Public
SetAllConnectionInternal (value)
Public
SetConnectionValue (dir, value)

Set which layer a grid connection goes to.

Public
SetPosition (position)
Public
UpdateRecursiveG (path, pathNode, handler)
Public

Public Static Methods

GetGridGraph (graphIndex)
Public Static
SetGridGraph (graphIndex, graph)
Public Static

Public Variables

HasAnyGridConnections
Public
HasConnectionsToAllEightNeighbours
Public
LayerCoordinateInGrid

Layer coordinate of the node in the grid.

Public
gridConnections
Public

Public Static Variables

MaxLayerCount
Public Static
NoConnection
Public Static

Inherited Public Members

AddConnection (node, cost)

Add a connection from this node to the specified node.

Public
Area

Connected component that contains the node.

Public
ClearConnections (alsoReverse)

Remove all connections from this node.

Public
ClearCustomConnections (alsoReverse)

Same as ClearConnections, but does not clear grid connections, only custom ones (e.g added by AddConnection or a NodeLink component)

Public
ContainsConnection (node)

Checks if this node has a connection to the specified node.

Public
DeserializeReferences (ctx)

Used to deserialize references to other nodes e.g connections.

Public
Destroy ()

Destroys the node.

Public
Destroyed
Public
Flags

Holds various bitpacked variables.

Public
GetConnections (action)

Calls the delegate with all connections from this node.

Public
GetGizmoHashCode ()

Hash code used for checking if the gizmos need to be updated.

Public
Graph

Graph which this node belongs to.

Public
GraphIndex

Graph which contains this node.

Public
MaxGraphIndex

Max number of graphs-1.

Public Static
MaxHierarchicalNodeIndex
Public Static
MaxTagIndex

Max number of tags - 1.

Public Static
NodeInGridIndex

The index of the node in the grid.

Public
NodeInGridIndexLayerOffset
Public Static
NodeIndex

Internal unique index.

Public
NormalizePoint (worldPoint)

Transforms a world space point to a normalized point on this node's surface.

Public
Open (path, pathNode, handler)

Open the node.

Public
Penalty

Penalty cost for walking on this node.

Public
RandomPointOnSurface ()

A random point on the surface of the node.

Public
RemoveConnection (node)

Removes any connection from this node to the specified node.

Public
SerializeReferences (ctx)

Used to serialize references to other nodes e.g connections.

Public
SetConnectivityDirty ()

Inform the system that the node's connectivity has changed.

Public
SurfaceArea ()

The surface area of the node in square world units.

Public
Tag

Node tag.

Public
TmpWalkable

Temporary variable used internally when updating the graph.

Public
UnNormalizePoint (normalizedPointOnSurface)

Transforms a normalized point on this node's surface to a world space point.

Public
UpdateRecursiveG (path, pathNode, handler)
Public
Walkable

True if the node is traversable.

Public
WalkableErosion

Stores walkability before erosion is applied.

Public
XCoordinateInGrid

X coordinate of the node in the grid.

Public
ZCoordinateInGrid

Z coordinate of the node in the grid.

Public
connections

Custon non-grid connections from this node.

Public
position

Position of the node in world space.

Public

Private/Protected Members

AxisAlignedConnectionsOR
Internal Static
ConnectionMask
Internal Static
ConnectionStride
Internal Static
HierarchicalNodeIndex

Hierarchical Node that contains this node.

Internal
IsHierarchicalNodeDirty

Some internal bookkeeping.

Internal
MaxNeighbours
Private Static
NodeInGridIndexMask
Protected Static
RemoveGridConnection (node)

Removes a connection from the internal grid connections, not the list of custom connections.

Protected
TemporaryFlag1

Temporary flag for internal purposes.

Internal
TemporaryFlag2

Temporary flag for internal purposes.

Internal
_gridGraphs
Private Static
flags

Bitpacked field holding several pieces of data.

Protected
gridFlags
Protected
gridGraphs
Protected Static
nodeInGridIndex

Bitfield containing the x and z coordinates of the node as well as the layer (for layered grid graphs).

Protected

Deprecated Members

GetConnection (i)

Is there a grid connection in that direction.

Public