Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#
Method group is Obsolete
Experimental: this API is experimental and might be changed or removed in the future.

NavMeshQuery.IsValid

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Obsolete The experimental NavMeshQuery struct has been deprecated. Use NavWorld instead.

Declaration

public bool IsValid(PolygonId polygon);

Parameters

Parameter Description
polygon Identifier of the NavMesh node to be checked.

Description

Returns true if the node referenced by the specified PolygonId is active in the NavMesh.

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 NavMeshBuilder.UpdateNavMeshData or use a NavMeshObstacle to carve it.


Obsolete The experimental NavMeshQuery struct has been deprecated. Use NavWorld instead.

Declaration

public bool IsValid(NavMeshLocation location);

Parameters

Parameter Description
location Location on the NavMesh to be checked. Same as checking location.polygon directly.

Description

Returns true if the node referenced by the PolygonId contained in the NavMeshLocation is active in the NavMesh.