Class LayerGridGraph Extends GridGraph, IUpdatableGraph
Grid Graph, supports layered worlds.
The GridGraph is great in many ways, reliable, easily configured and updatable during runtime. But it lacks support for worlds which have multiple layers, such as a building with multiple floors. That's where this graph type comes in. It supports basically the same stuff as the grid graph, but also multiple layers. It uses a bit more memory than a regular grid graph, but is otherwise equivalent.
See
A* Pro Feature:
This is an A* Pathfinding Project Pro feature only. This function/class/variable might not exist in the Free version of the A* Pathfinding Project or the functionality might be limited.
The Pro version can be bought here
Inner Types
Public Methods
Calculates the grid connections for a single node.
Calculates connections for all nodes in a cell (there may be multiple layers of nodes)
Calculates the layered grid graph connections for a single node.
Number of nodes in the graph.
Returns the nearest node to a position using the specified NNConstraint.
Node in the specified cell in the first layer.
Node in the specified cell.
Calls a delegate with all nodes in the graph.
Get all nodes in a rectangle.
Get all nodes in a rectangle.
Recalculates single cell.
Public Variables
Nodes with a short distance to the node above it will be set unwalkable.
Inherited Public Members
Calculates the grid connections for a cell as well as its neighbours.
Returns a new transform which transforms graph space to world space.
Returns if node is connected to it's neighbour in the specified direction.
Erodes the walkable area.
Erodes the walkable area.
Returns the nearest node to a position.
Returns the nearest node to a position using the specified NNConstraint.
Returns the nearest node to a position using the specified constraint .
Calls a delegate with all nodes in the graph until the delegate returns false.
All nodes inside the bounding box.
All nodes inside the shape.
A rect that contains all nodes that the bounds could touch.
Transform a point in graph space to world space.
Returns true if a connection between the adjacent nodes n1 and n2 is valid.
Number of layers in the graph.
Returns if there is an obstacle between from and to on the graph.
Returns if there is an obstacle between from and to on the graph.
Returns if there is an obstacle between the two nodes on the graph.
Returns if there is an obstacle between from and to on the graph.
Returns if there is an obstacle between the two nodes on the graph.
Returns if there is an obstacle between the two nodes on the graph.
Draw gizmos for the graph.
Moves the nodes in this graph.
Relocate the grid graph using new settings.
Scan the graph.
Updates unclampedSize from width, depth and nodeSize values.
Changes the grid shape.
Scaling of the graph along the X axis.
Center point of the grid.
Settings on how to check for walkability and height.
If disabled, will not cut corners on obstacles.
Depth (height) of the grid in nodes.
Enable to draw gizmos in the Unity scene view.
Erosion of the graph.
Tag to start from when using tags for erosion.
Use tags instead of walkability for erosion.
In GetNearestForce, determines how far to search after a valid node has been found.
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.
Determines the layout of the grid graph inspector in the Unity Editor.
Determines how the size of each hexagon is set in the inspector.
Get or set if the graph should be in 2D mode.
Angle to use for the isometric projection.
The max slope in degrees for a node to be walkable.
The max y coordinate difference between two nodes to enable a connection.
Name of the graph.
Costs to neighbour nodes.
Index offset to get neighbour nodes.
Offsets in the X direction for neighbour nodes.
Offsets in the Z direction for neighbour nodes.
Number of neighbours for each node.
Size of one node in world units.
All nodes in this graph.
Is the graph open in the editor.
Rotation of the grid in degrees.
Additional rules to use when scanning the grid graph.
Show an outline of the grid nodes in the Unity Editor.
Show the surface of the graph.
Show the connections between the grid nodes in the Unity Editor.
Size of the grid.
Determines how the graph transforms graph space to world space.
Size of the grid.
If true, all edge costs will be set to the same value.
This is placed here so generators inheriting from this one can override it and set it to false.
Use jump point search to speed up pathfinding.
Width of the grid in nodes.
Private/Protected Members
Increases the capacity of the nodes array to hold more layers.
Throws an exception if it is not safe to update internal graph data right now.
Clips a line segment in graph space to the graph bounds.
Magnitude of the cross product a x b.
Deserializes graph type specific node data.
Destroys all nodes in the graph.
Cleans up any unmanaged data that the graph has.
True if the node has any blocked connections.
All nodes inside the shape or if null, the bounding box.
Mask based on hexagonNeighbourIndices.
Function for cleaning up references.
Called after all deserialization has been done for all graphs.
Fires a ray from the sky and returns a sample for everything it hits.
Internal method to scan the graph.
Serializes graph type specific node data.
Sorts RaycastHits by distance.
True if the graph exists, false if it has been destroyed.
Which neighbours are going to be used when neighbours=6.
Number of layers.
Delegate which creates and returns a single instance of the node type for this graph.
Surface normal for each node.
Use heigh raycasting normal for max slope calculation.
Deprecated Members
Calculates the layered grid graph connections for a single node.
Returns if node is connected to it's neighbour in the specified direction.
Internal method to scan the graph.