Scripting API

Scripting API

NavMeshLink2D

Struct in Abyss.Navigation, from Abyss.Navigation.

A way across what the navmesh cannot walk, in 2D: a gap to jump, a hole to climb through, a door the game opens. Baked into the navmesh of each NavMeshSurface2D that collects its entity, from NavMeshLink2D.Start to NavMeshLink2D.End, so a path is planned across it as it is across a floor of its NavMeshLink2D.Area; an agent crosses it by itself, or waits at its start for the game's code where its Auto Traverse is off.

public struct NavMeshLink2D

Remarks

Each end on the navmesh, or within the agent's radius of it: an end too far from it joins nothing, and the link is not crossed.

As wide as NavMeshLink2D.Width: several links side by side, an agent's width apart; 0 for one.

Constructors

public NavMeshLink2D()

From a unit left of its entity to a unit right of it, both ways, Walkable.

Fields

Start

public Vector2 Start

Where it starts, in its entity's own units.

End

public Vector2 End

Where it ends, in its entity's own units.

Width

public float Width

How wide it is across the way it goes: 0 for one link.

BothWays

public bool BothWays

Whether it is crossed from its end to its start too.

Area

public int Area

The area it counts as, by its place in Project Settings ▸ Navigation: what crossing it costs, and which agents may.