Scripting API
Scripting API
NavMeshSurface2D
Struct in Abyss.Navigation, from Abyss.Navigation.
Where agents of one type walk in a game seen from above, in 2D: a navmesh baked from the Tilemaps under it, or of its whole scene, for the agent type it names; the bake kept in a file beside its scene (NavMeshSurface2D.Baked), which the game loads as the surface appears. Baked in the editor by Window ▸ Navigation ▸ Navigation, or by Bake on its menu in the Inspector.
public struct NavMeshSurface2DRemarks
The floor is every tile painted on the Tilemaps it collects, but those a Tilemap Collider 2D meets as Solid, which are walls; where it collects no Tilemap, the rectangle of its NavMeshSurface2D.Size about its entity.
Less what stands still: the colliders of what it collects that do not move cut their shapes out of the floor, as Physics 2D gives them, and an agent keeps its radius from every edge.
Constructors
NavMeshSurface2D
public NavMeshSurface2D()Baked for the first agent type, from the Tilemaps under it, on every layer.
Fields
AgentType
public int AgentTypeWhich agent type it is baked for: its place in Project Settings ▸ Navigation.
Collect
public NavMeshCollect2D CollectWhich entities.
Layers
public LayerMask LayersOnly entities on these layers are baked.
Size
public Vector2 SizeThe floor's size about its entity, in the entity's units, where it collects no Tilemap.
Baked
public FileRef BakedThe navmesh it was baked as, a file beside its scene; none before it is baked.
