IsValid
Returns true if the node referenced by the specified PolygonId is active in the NavMesh.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Experimental.AI
- Assembly: UnityEngine.AIModule
IsValid(PolygonId)
Returns true if the node referenced by the specified PolygonId is active in the NavMesh.
public bool IsValid(PolygonId polygon)
Parameters
Identifier of the NavMesh node to be checked.
Returns
Type | Description |
|---|---|
| bool |
Remarks
You can make NavMesh nodes invalid when you remove the NavMesh surface or the links they belong to, or when you modify the NavMesh in their region, replacing them. You can remove the NavMesh surface and links with calls to NavMesh.RemoveNavMeshData, NavMesh.RemoveLink. To modify the NavMesh, call UpdateNavMeshData or use a NavMeshObstacle to carve it.
IsValid(NavMeshLocation)
Returns if the node referenced by the PolygonId contained in the NavMeshLocation is active in the NavMesh.
truepublic bool IsValid(NavMeshLocation location)
Parameters
Location on the NavMesh to be checked. Same as checking directly.
location.polygonReturns
Type | Description |
|---|---|
| bool |