NavigationPathQueryResult2D
Represents the result of a 2D pathfinding query.
Represents the result of a 2D pathfinding query.
This class stores the result of a 2D navigation path query from the NavigationServer2D.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
NavigationPathQueryResult2DConstructor
public NavigationPathQueryResult2D();Properties5
PathProperty
public Vector2[] Path { get; set; }Points from the last executed query. May be empty, partial or have projected endpoints. Existing points do not prove connection between the requested start and target; check both ends.
PathLengthProperty
public float PathLength { get; set; }Length of the last query result. In SDK 1.0.0 Reset() retains this value while clearing arrays. Do not treat retained length as evidence of a path; set PathLength = 0 when manually clearing results.
PathOwnerIdsProperty
public long[] PathOwnerIds { get; set; }Object owner IDs for points when Owners is enabled. A server-created region without an owner can return zero. Validate the ID before attempting to resolve an Entity.
PathRidsProperty
public Reckfell.Collections.Array<Rid> PathRids { get; set; }Owner RIDs for corresponding points when Rids is enabled. A region entry is its navigation-region RID, not an Entity ID. Do not use a RID after its owner is freed.
PathTypesProperty
public int[] PathTypes { get; set; }Owner types for corresponding path points when Types is enabled. Metadata rather than movement instructions or automatic link traversal.
Methods14
GetPathVector2[]
public Vector2[] GetPath();Vector2[]GetPathLengthfloat
public float GetPathLength();floatGetPathOwnerIdslong[]
public long[] GetPathOwnerIds();long[]GetPathRidsReckfell.Collections.Array<Rid>
public Reckfell.Collections.Array<Rid> GetPathRids();Reckfell.Collections.Array<Rid>GetPathTypesint[]
public int[] GetPathTypes();int[]Resetvoid
public void Reset();Clears Path, PathTypes, PathRids and PathOwnerIds. The installed SDK 1.0.0 retains PathLength; reset it separately if needed. Does not clear options in a separate parameters object.
SetPath2 overloads
public void SetPath(Vector2[] path);| Name | Type | Default |
|---|---|---|
path | Vector2[] | — |
public void SetPath(ReadOnlySpan<Vector2> path);| Name | Type | Default |
|---|---|---|
path | ReadOnlySpan<Vector2> | — |
SetPathLengthvoid
public void SetPathLength(float length);| Name | Type | Default |
|---|---|---|
length | float | — |
SetPathOwnerIds2 overloads
public void SetPathOwnerIds(long[] pathOwnerIds);| Name | Type | Default |
|---|---|---|
pathOwnerIds | long[] | — |
public void SetPathOwnerIds(ReadOnlySpan<long> pathOwnerIds);| Name | Type | Default |
|---|---|---|
pathOwnerIds | ReadOnlySpan<long> | — |
SetPathRidsvoid
public void SetPathRids(Reckfell.Collections.Array<Rid> pathRids);| Name | Type | Default |
|---|---|---|
pathRids | Reckfell.Collections.Array<Rid> | — |
SetPathTypes2 overloads
public void SetPathTypes(int[] pathTypes);| Name | Type | Default |
|---|---|---|
pathTypes | int[] | — |
public void SetPathTypes(ReadOnlySpan<int> pathTypes);| Name | Type | Default |
|---|---|---|
pathTypes | ReadOnlySpan<int> | — |
NavigationPathQueryResult2D.PathSegmentType
| Value | Description |
|---|---|
Link = 1 | This segment of the path goes through a link. |
Region = 0 | This segment of the path goes through a region. |