Generates graphs based on navmeshes.
Navmeshes are meshes where each triangle defines a walkable area. These are great because the AI can get so much more information on how it can walk. Polygons instead of points mean that the funnel smoother can produce really nice looking paths and the graphs are also really fast to search and have a low memory footprint because fewer nodes are usually needed to describe the same area compared to grid graphs.
- See Also
- Pathfinding.RecastGraph
|
override GraphTransform | CalculateTransform () |
| Returns a new transform which transforms graph space to world space.
|
|
void | ScanInternal (string objMeshPath) |
| Scans the graph using the path to an .obj mesh.
|
|
void | EndBatchTileUpdate () |
| End batch updating of tiles.
|
|
override NNInfoInternal | GetNearest (Vector3 position, NNConstraint constraint, GraphNode hint) |
| Returns the nearest node to a position using the specified NNConstraint.
|
|
override NNInfoInternal | GetNearestForce (Vector3 position, NNConstraint constraint) |
| Returns the nearest node to a position using the specified constraint .
|
|
override void | GetNodes (System.Action< GraphNode > action) |
| Calls a delegate with all nodes in the graph.
|
|
NavmeshTile | GetTile (int x, int z) |
| Tile at the specified x, z coordinate pair.
|
|
Bounds | GetTileBounds (IntRect rect) |
| Returns an XZ bounds object with the bounds of a group of tiles.
|
|
Bounds | GetTileBounds (int x, int z, int width=1, int depth=1) |
| Returns an XZ bounds object with the bounds of a group of tiles.
|
|
Bounds | GetTileBoundsInGraphSpace (IntRect rect) |
|
Bounds | GetTileBoundsInGraphSpace (int x, int z, int width=1, int depth=1) |
| Returns an XZ bounds object with the bounds of a group of tiles in graph space.
|
|
void | GetTileCoordinates (int tileIndex, out int x, out int z) |
| Tile coordinates from a tile index.
|
|
Int2 | GetTileCoordinates (Vector3 position) |
| Returns the tile coordinate which contains the specified position.
|
|
NavmeshTile[] | GetTiles () |
| All tiles.
|
|
IntRect | GetTouchingTiles (Bounds bounds) |
| Returns a rect containing the indices of all tiles touching the specified bounds.
|
|
IntRect | GetTouchingTilesInGraphSpace (Rect rect) |
| Returns a rect containing the indices of all tiles touching the specified bounds.
|
|
IntRect | GetTouchingTilesRound (Bounds bounds) |
| Returns a rect containing the indices of all tiles by rounding the specified bounds to tile borders.
|
|
Int3 | GetVertex (int index) |
| Vertex coordinate for the specified vertex index.
|
|
int | GetVertexArrayIndex (int index) |
|
Int3 | GetVertexInGraphSpace (int index) |
| Vertex coordinate in graph space for the specified vertex index.
|
|
bool | Linecast (Vector3 origin, Vector3 end) |
| Returns if there is an obstacle between origin and end on the graph.
|
|
bool | Linecast (Vector3 origin, Vector3 end, GraphNode hint, out GraphHitInfo hit) |
| Returns if there is an obstacle between origin and end on the graph.
|
|
bool | Linecast (Vector3 origin, Vector3 end, GraphNode hint) |
| Returns if there is an obstacle between origin and end on the graph.
|
|
bool | Linecast (Vector3 origin, Vector3 end, GraphNode hint, out GraphHitInfo hit, List< GraphNode > trace) |
| Returns if there is an obstacle between origin and end on the graph.
|
|
override void | OnDrawGizmos (Pathfinding.Util.RetainedGizmos gizmos, bool drawNodes) |
|
GraphNode | PointOnNavmesh (Vector3 position, NNConstraint constraint) |
| Finds the first node which contains position.
|
|
override void | RelocateNodes (Matrix4x4 deltaMatrix) |
| Moves the nodes in this graph.
|
|
void | RelocateNodes (GraphTransform newTransform) |
| Moves the nodes in this graph.
|
|
void | ReplaceTile (int x, int z, Int3[] verts, int[] tris) |
| Replace tile at index with nodes created from specified navmesh.
|
|
void | ReplaceTile (int x, int z, int w, int d, Int3[] verts, int[] tris) |
| Replaces a tile with a new mesh.
|
|
void | StartBatchTileUpdate () |
| Start batch updating of tiles.
|
|
virtual int | CountNodes () |
| Number of nodes in the graph.
|
|
NNInfoInternal | GetNearest (Vector3 position) |
| Returns the nearest node to a position using the default NNConstraint.
|
|
NNInfoInternal | GetNearest (Vector3 position, NNConstraint constraint) |
| Returns the nearest node to a position using the specified NNConstraint.
|
|
void | GetNodes (System.Func< GraphNode, bool > action) |
| Calls a delegate with all nodes in the graph until the delegate returns false.
|
|
virtual void | OnDrawGizmos (RetainedGizmos gizmos, bool drawNodes) |
| Draw gizmos for the graph.
|
|
void | RelocateNodes (Matrix4x4 oldMatrix, Matrix4x4 newMatrix) |
| Moves nodes in this graph.
|
|
void | Scan () |
| Scan the graph.
|
|
void | ScanGraph () |
| Scan the graph.
|
|
void | SetMatrix (Matrix4x4 m) |
| Use to set both matrix and inverseMatrix at the same time.
|
|
void | DeserializeExtraInfo (GraphSerializationContext ctx) |
|
void | DeserializeSettingsCompatibility (GraphSerializationContext ctx) |
|
void | DestroyAllNodes () |
|
void | OnDestroy () |
|
void | PostDeserialization (GraphSerializationContext ctx) |
|
IEnumerable< Progress > | ScanInternal () |
|
void | SerializeExtraInfo (GraphSerializationContext ctx) |
|
void | GetNodes (System.Action< GraphNode > del) |
|
void | GetTileCoordinates (int tileIndex, out int x, out int z) |
| Transforms coordinates from graph space to world space.
|
|
Int3 | GetVertex (int i) |
| Position of vertex number i in the world.
|
|
int | GetVertexArrayIndex (int index) |
|
Int3 | GetVertexInGraphSpace (int i) |
| Position of vertex number i in coordinates local to the graph.
|
|
GraphUpdateThreading | CanUpdateAsync (GraphUpdateObject o) |
|
void | UpdateArea (GraphUpdateObject o) |
| Updates an area using the specified GraphUpdateObject.
|
|
void | UpdateAreaInit (GraphUpdateObject o) |
| May be called on the Unity thread before starting the update.
|
|
void | UpdateAreaPost (GraphUpdateObject o) |
| May be called on the Unity thread after executing the update.
|
|
|
override void | DeserializeSettingsCompatibility (GraphSerializationContext ctx) |
| An old format for serializing settings.
|
|
override IEnumerable< Progress > | ScanInternal () |
| Internal method to scan the graph.
|
|
void | ClearTiles (int x, int z, int w, int d) |
| Clear all tiles within the rectangle with one corner at (x,z), width w and depth d.
|
|
void | ConnectTiles (NavmeshTile tile1, NavmeshTile tile2) |
| Generate connections between the two tiles.
|
|
void | ConnectTileWithNeighbours (NavmeshTile tile, bool onlyUnflagged=false) |
|
TriangleMeshNode[] | CreateNodes (int[] tris, int tileIndex, uint graphIndex) |
|
override void | DeserializeExtraInfo (GraphSerializationContext ctx) |
| Deserializes graph type specific node data.
|
|
void | FillWithEmptyTiles () |
| Fills graph with tiles created by NewEmptyTile.
|
|
NavmeshTile | NewEmptyTile (int x, int z) |
| Creates a single new empty tile.
|
|
override void | OnDestroy () |
| Function for cleaning up references.
|
|
override void | PostDeserialization (GraphSerializationContext ctx) |
| Called after all deserialization has been done for all graphs.
|
|
void | RemoveConnectionsFromTile (NavmeshTile tile) |
|
void | RemoveConnectionsFromTo (NavmeshTile a, NavmeshTile b) |
|
override void | SerializeExtraInfo (GraphSerializationContext ctx) |
| Serializes Node Info.
|
|
virtual void | DestroyAllNodes () |
| Destroys all nodes in the graph.
|
|
void | DrawUnwalkableNodes (float size) |
|