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.
|
|
GraphUpdateThreading | CanUpdateAsync (GraphUpdateObject o) |
|
override void | DeserializeSettingsCompatibility (GraphSerializationContext ctx) |
| An old format for serializing settings.
|
|
void | ScanInternal (string objMeshPath) |
| Scans the graph using the path to an .obj mesh.
|
|
override IEnumerable< Progress > | ScanInternal () |
| Internal method to scan the graph.
|
|
void | UpdateArea (GraphUpdateObject o) |
|
void | UpdateAreaInit (GraphUpdateObject o) |
|
void | UpdateAreaPost (GraphUpdateObject o) |
|
override void | DeserializeExtraInfo (GraphSerializationContext ctx) |
| Deserializes graph type specific node data.
|
|
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 p) |
| Returns the tile coordinate which contains the point p.
|
|
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 | OnDestroy () |
| Function for cleaning up references.
|
|
override void | OnDrawGizmos (Pathfinding.Util.RetainedGizmos gizmos, bool drawNodes) |
|
GraphNode | PointOnNavmesh (Vector3 position, NNConstraint constraint) |
| Finds the first node which contains position.
|
|
override void | PostDeserialization () |
| Called after all deserialization has been done for all graphs.
|
|
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.
|
|
override void | SerializeExtraInfo (GraphSerializationContext ctx) |
| Serializes Node Info.
|
|
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 () |
|
void | ScanGraph () |
| Partially scan the graph.
|
|
void | SetMatrix (Matrix4x4 m) |
| Use to set both matrix and inverseMatrix at the same time.
|
|
void | GetNodes (System.Action< GraphNode > del) |
|
void | GetTileCoordinates (int tileIndex, out int x, out int z) |
|
Int3 | GetVertex (int i) |
|
int | GetVertexArrayIndex (int index) |
|
Int3 | GetVertexInGraphSpace (int i) |
|
bool | Linecast (Vector3 start, Vector3 end) |
|
bool | Linecast (Vector3 start, Vector3 end, GraphNode hint) |
|
bool | Linecast (Vector3 start, Vector3 end, GraphNode hint, out GraphHitInfo hit) |
|
bool | Linecast (Vector3 start, Vector3 end, GraphNode hint, out GraphHitInfo hit, List< GraphNode > trace) |
|
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.
|
|