Class NavMeshPathExtensions
UnityEngine.AI.NavMeshPath Based Extension Methods
Inheritance
Namespace: GDX
Syntax
[VisualScriptingCompatible((short)2)]
public static class NavMeshPathExtensions
Methods
| Improve this Doc View SourceGetPositionAtDistance(NavMeshPath, Single)
Get a position along a UnityEngine.AI.NavMeshPath based on the travel distance along it.
Declaration
public static Vector3 GetPositionAtDistance(this NavMeshPath targetNavMeshPath, float distance)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.AI.NavMeshPath | targetNavMeshPath | The calculated path to evaluate for the position. |
System.Single | distance | The distance along the calculated path to find the position at. |
Returns
Type | Description |
---|---|
UnityEngine.Vector3 | The position found on the UnityEngine.AI.NavMeshPath. |
Exceptions
Type | Condition |
---|---|
UnsupportedRuntimeException | Not supported on DOTS Runtime. |
GetPositionAtDistanceSqr(NavMeshPath, Single)
Get a position along a UnityEngine.AI.NavMeshPath based on the travel square distance along it.
Declaration
public static Vector3 GetPositionAtDistanceSqr(this NavMeshPath targetNavMeshPath, float distance)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.AI.NavMeshPath | targetNavMeshPath | The calculated path to evaluate for the position. |
System.Single | distance | The distance along the calculated path to find the position at. |
Returns
Type | Description |
---|---|
UnityEngine.Vector3 | The position found on the UnityEngine.AI.NavMeshPath. |
Exceptions
Type | Condition |
---|---|
UnsupportedRuntimeException | Not supported on DOTS Runtime. |
GetTotalDistance(NavMeshPath)
Get the total travel distance, from start to finish of a calculated UnityEngine.AI.NavMeshPath.
Declaration
public static float GetTotalDistance(this NavMeshPath targetNavMeshPath)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.AI.NavMeshPath | targetNavMeshPath | The calculated path to evaluate for its length. |
Returns
Type | Description |
---|---|
System.Single | The total distance of a calculated path. |
Remarks
The UnityEngine.AI.NavMeshPath.corners does allocate internally.
Exceptions
Type | Condition |
---|---|
UnsupportedRuntimeException | Not supported on DOTS Runtime. |
GetTotalDistanceSqr(NavMeshPath)
Get the total squared distance, from start to finish of a calculated UnityEngine.AI.NavMeshPath.
Declaration
public static float GetTotalDistanceSqr(this NavMeshPath targetNavMeshPath)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.AI.NavMeshPath | targetNavMeshPath | The calculated path to evaluate for its squared length. |
Returns
Type | Description |
---|---|
System.Single | The total squared distance of a calculated path. |
Remarks
The UnityEngine.AI.NavMeshPath.corners does allocate internally.
Exceptions
Type | Condition |
---|---|
UnsupportedRuntimeException | Not supported on DOTS Runtime. |