|
void | AddLayers (int count) |
| Increases the capacity of the nodes array to hold more layers.
|
|
new void | AddPortal (Node n1, Node n2, List< Vector3 > left, List< Vector3 > right) |
|
void | AddPortal (LevelGridNode n1, LevelGridNode n2, List< Vector3 > left, List< Vector3 > right) |
|
new void | BuildFunnelCorridor (List< Node > path, int sIndex, int eIndex, List< Vector3 > left, List< Vector3 > right) |
|
void | CalculateConnections (Node[] nodes, Node node, int x, int z, int layerIndex) |
|
bool | CheckConnection (LevelGridNode node, int dir) |
| Returns if node is connected to it's neighbour in the specified direction.
|
|
override Node[] | CreateNodes (int number) |
| Creates a number of nodes with the correct type for the graph.
|
|
new void | DeSerializeSettings (AstarSerializer serializer) |
|
override void | ErodeWalkableArea (int xmin, int zmin, int xmax, int zmax) |
| Erodes the walkable area.
|
|
override NNInfo | GetNearest (Vector3 position, NNConstraint constraint, Node hint=null) |
|
override NNInfo | GetNearestForce (Vector3 position, NNConstraint constraint) |
|
new bool | Linecast (Vector3 _a, Vector3 _b) |
| Returns if _b is visible from _a on the graph.
|
|
new bool | Linecast (Vector3 _a, Vector3 _b, Node hint) |
| Returns if _b is visible from _a on the graph.
|
|
new bool | Linecast (Vector3 _a, Vector3 _b, Node hint, out GraphHitInfo hit) |
| Returns if _b is visible from _a on the graph.
|
|
override void | OnDestroy () |
| This function will be called when this graph is destroyed.
|
|
override void | OnDrawGizmos (bool drawNodes) |
|
bool | RecalculateCell (int x, int z, bool preserveExistingNodes) |
| Recalculates single cell.
|
|
new void | RemoveGridGraphFromStatic () |
|
override void | Scan () |
| Scans the graph, called from AstarPath.Scan Override this function to implement custom scanning logic
|
|
new void | SerializeSettings (AstarSerializer serializer) |
|
new bool | SnappedLinecast (Vector3 _a, Vector3 _b, Node hint, out GraphHitInfo hit) |
| Returns if _b is visible from _a on the graph.
|
|
new void | UpdateArea (GraphUpdateObject o) |
|
virtual void | UpdatePenalty (LevelGridNode node) |
| Updates penalty for the node.
|
|
void | AddPortal (Node n1, Node n2, List< Vector3 > left, List< Vector3 > right) |
|
void | AddPortal (GridNode n1, GridNode n2, List< Vector3 > left, List< Vector3 > right) |
|
void | BuildFunnelCorridor (List< Node > path, int sIndex, int eIndex, List< Vector3 > left, List< Vector3 > right) |
|
virtual void | CalculateConnections (Node[] nodes, int x, int z, GridNode node) |
| Calculates the grid connections for a single node.
|
|
bool | CheckConnection (GridNode node, int dir) |
| Returns if node is connected to it's neighbour in the specified direction.
|
|
void | DeSerializeNodes (Node[] nodes, AstarSerializer serializer) |
| Deserializes grid graph specific node stuff from the serializer.
|
|
void | DeSerializeSettings (AstarSerializer serializer) |
|
virtual void | ErodeWalkableArea () |
| Erodes the walkable area.
|
|
void | GenerateMatrix () |
| Generates the matrix used for translating nodes from grid coordinates to world coordintes.
|
|
void | GetBoundsMinMax (Bounds b, Matrix4x4 matrix, out Vector3 min, out Vector3 max) |
| Calculates minimum and maximum points for bounds b when multiplied with the matrix.
|
|
List< Node > | GetNodesInArea (Bounds b) |
| All nodes inside the bounding box.
|
|
List< Node > | GetNodesInArea (GraphUpdateShape shape) |
| All nodes inside the shape.
|
|
virtual bool | IsValidConnection (GridNode n1, GridNode n2) |
| Returns true if a connection between the adjacent nodes n1 and n2 is valid.
|
|
bool | Linecast (Vector3 _a, Vector3 _b) |
| Returns if _b is visible from _a on the graph.
|
|
bool | Linecast (Vector3 _a, Vector3 _b, Node hint) |
| Returns if _b is visible from _a on the graph.
|
|
bool | Linecast (Vector3 _a, Vector3 _b, Node hint, out GraphHitInfo hit) |
| Returns if _b is visible from _a on the graph.
|
|
void | OnPostScan (AstarPath script) |
| Auto links grid graphs together.
|
|
override void | PostDeserialization () |
| Called after all deserialization has been done for all graphs.
|
|
void | RemoveGridGraphFromStatic () |
|
void | SerializeNodes (Node[] nodes, AstarSerializer serializer) |
| Serializes grid graph specific node stuff to the serializer.
|
|
void | SerializeSettings (AstarSerializer serializer) |
| Serialize Settings.
|
|
virtual void | SetUpOffsetsAndCosts () |
| Sets up neighbourOffsets with the current settings.
|
|
bool | SnappedLinecast (Vector3 _a, Vector3 _b, Node hint, out GraphHitInfo hit) |
| Returns if _b is visible from _a on the graph.
|
|
void | UpdateArea (GraphUpdateObject o) |
| Internal function to update an area of the graph.
|
|
void | UpdateNodePositionCollision (Node node, int x, int z) |
| Updates position, walkability and penalty for the node.
|
|
void | UpdateSizeFromWidthDepth () |
| Updates size from width, depth and nodeSize values.
|
|
virtual void | Awake () |
| This will be called on the same time as Awake on the gameObject which the AstarPath script is attached to.
|
|
virtual void | DeserializeExtraInfo (byte[] bytes) |
| Deserializes graph type specific node data.
|
|
NNInfo | GetNearest (Vector3 position) |
| Returns the nearest node to a position using the default NNConstraint.
|
|
NNInfo | GetNearest (Vector3 position, NNConstraint constraint) |
| Returns the nearest node to a position using the specified NNConstraint.
|
|
bool | InSearchTree (Node node, Path path) |
| Returns if the node is in the search tree of the path.
|
|
virtual Color | NodeColor (Node node, NodeRunData data) |
|
virtual void | RelocateNodes (Matrix4x4 oldMatrix, Matrix4x4 newMatrix) |
| Relocates the nodes in this graph.
|
|
void | SafeOnDestroy () |
| SafeOnDestroy should be used when there is a risk that the pathfinding is searching through this graph when called
|
|
void | ScanGraph () |
| Consider using AstarPath.Scan () instead since this function might screw things up if there is more than one graph.
|
|
virtual byte[] | SerializeExtraInfo () |
| Serializes graph type specific node data.
|
|
Node[] | CreateNodes (int num) |
|
void | DeSerializeNodes (Node[] nodes, AstarSerializer serializer) |
|
void | SerializeNodes (Node[] nodes, AstarSerializer serializer) |
|
void | DeSerializeSettings (AstarSerializer serializer) |
| Called to deserialize the object.
|
|
void | SerializeSettings (AstarSerializer serializer) |
| Called to serialize the object.
|
|
void | UpdateArea (GraphUpdateObject o) |
| Updates an area using the specified GraphUpdateObject.
|
|
void | AddPortal (Node n1, Node n2, List< Vector3 > left, List< Vector3 > right) |
| Add the portal between node n1 and n2 to the funnel corridor.
|
|
void | BuildFunnelCorridor (List< Node > path, int sIndex, int eIndex, List< Vector3 > left, List< Vector3 > right) |
|
bool | Linecast (Vector3 start, Vector3 end) |
|
bool | Linecast (Vector3 start, Vector3 end, Node hint) |
|
bool | Linecast (Vector3 start, Vector3 end, Node hint, out GraphHitInfo hit) |
|
|
float | characterHeight = 0.4F |
| Nodes with a short distance to the node above it will be set unwalkable.
|
|
float | mergeSpanRange = 0.5F |
| If two layered nodes are too close, they will be merged.
|
|
int[] | nodeCellIndices |
|
Matrix4x4 | boundsMatrix |
|
Matrix4x4 | boundsMatrix2 |
|
int | getNearestForceOverlap = 2 |
| In GetNearestForce, determines how far to search after a valid node has been found.
|
|
int[] | neighbourCosts |
| Costs to neighbour nodes.
|
|
int[] | neighbourOffsets |
| Index offset to get neighbour nodes.
|
|
int[] | neighbourXOffsets |
| Offsets in the X direction for neighbour nodes.
|
|
int[] | neighbourZOffsets |
| Offsets in the Z direction for neighbour nodes.
|
|
int | scans = 0 |
|
Vector2 | size |
| Size of the grid.
|
|
int | width |
| Width of the grid in nodes.
|
|
int | depth |
| Depth (height) of the grid in nodes.
|
|
float | aspectRatio = 1F |
| Scaling of the graph along the X axis.
|
|
Vector3 | rotation |
| Rotation of the grid in degrees.
|
|
Bounds | bounds |
|
Vector3 | center |
| Center point of the grid.
|
|
Vector2 | unclampedSize |
| Size of the grid.
|
|
float | nodeSize = 1 |
| Size of one node in world units.
|
|
GraphCollision | collision |
| Settings on how to check for walkability and height.
|
|
float | maxClimb = 0.4F |
| The max position difference between two nodes to enable a connection.
|
|
int | maxClimbAxis = 1 |
| The axis to use for maxClimb.
|
|
float | maxSlope = 90 |
| The max slope in degrees for a node to be walkable.
|
|
int | erodeIterations = 0 |
| Erosion of the graph.
|
|
bool | erosionUseTags = false |
| Use tags instead of walkability for erosion.
|
|
int | erosionFirstTag = 1 |
| Tag to start from when using tags for erosion.
|
|
bool | autoLinkGrids = false |
| Auto link the graph's edge nodes together with other GridGraphs in the scene on Scan.
|
|
float | autoLinkDistLimit = 10F |
| Distance limit for grid graphs to be auto linked.
|
|
NumNeighbours | neighbours = NumNeighbours.Eight |
| Number of neighbours for each node.
|
|
bool | cutCorners = true |
| If disabled, will not cut corners on obstacles.
|
|
float | penaltyPositionOffset = 0 |
| Offset for the position when calculating penalty.
|
|
bool | penaltyPosition = false |
| Use position (y-coordinate) to calculate penalty.
|
|
float | penaltyPositionFactor = 1F |
| Scale factor for penalty when calculating from position.
|
|
bool | penaltyAngle = false |
|
float | penaltyAngleFactor = 100F |
|
TextureData | textureData = new TextureData () |
| Holds settings for using a texture as source for a grid graph.
|
|
byte[] | _sguid |
| Used to store the guid value.
|
|
AstarPath | active |
| Reference to the AstarPath object in the scene.
|
|
bool | drawGizmos = true |
|
bool | infoScreenOpen |
| Used in the editor to check if the info screen is open.
|
|
uint | initialPenalty = 0 |
|
Matrix4x4 | matrix |
| A matrix for translating/rotating/scaling the graph.
|
|
string | name |
|
Node[] | nodes |
| All nodes this graph contains.
|
|
bool | open |
| Is the graph open in the editor
|
|
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 more memory, and is probably a bit slower.
- Note
- It does not yet have support for updating the graph during runtime with GraphUpdateObjects.
- 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