NavigationMeshSourceGeometryData2D
Container for parsed source geometry data used in navigation mesh baking.
Container for parsed source geometry data used in navigation mesh baking.
Container for parsed source geometry data used in navigation mesh baking.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
NavigationMeshSourceGeometryData2DConstructor
public NavigationMeshSourceGeometryData2D();Properties3
ObstructionOutlinesProperty
public Reckfell.Collections.Array<Vector2[]> ObstructionOutlines { get; set; }ProjectedObstructionsProperty
public Reckfell.Collections.Array ProjectedObstructions { get; set; }TraversableOutlinesProperty
public Reckfell.Collections.Array<Vector2[]> TraversableOutlines { get; set; }Methods19
AddObstructionOutline2 overloads
public void AddObstructionOutline(Vector2[] shapeOutline);Adds the outline points of a shape as obstructed area.
| Name | Type | Default |
|---|---|---|
shapeOutline | Vector2[] | — |
public void AddObstructionOutline(ReadOnlySpan<Vector2> shapeOutline);Adds the outline points of a shape as obstructed area.
| Name | Type | Default |
|---|---|---|
shapeOutline | ReadOnlySpan<Vector2> | — |
AddProjectedObstruction2 overloads
public void AddProjectedObstruction(Vector2[] vertices, bool carve);Adds a forbidden-area outline to bake-source data. Then explicitly call BakeFromSourceGeometryData, assign output to a region and wait for the map update.
| Name | Type | Default |
|---|---|---|
vertices | Vector2[] | — |
carve | bool | — |
verticesOutline vertices in source-data coordinates. The example uses a simple rectangle without self-intersections.
carvetrue cuts after the AgentRadius offset; false allows the offset to expand forbidden space around the obstruction.
public void AddProjectedObstruction(ReadOnlySpan<Vector2> vertices, bool carve);Adds a projected obstruction shape to the source geometry. If carve is true the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process.
| Name | Type | Default |
|---|---|---|
vertices | ReadOnlySpan<Vector2> | — |
carve | bool | — |
AddTraversableOutline2 overloads
public void AddTraversableOutline(Vector2[] shapeOutline);Adds the outline points of a shape as traversable area.
| Name | Type | Default |
|---|---|---|
shapeOutline | Vector2[] | — |
public void AddTraversableOutline(ReadOnlySpan<Vector2> shapeOutline);Adds the outline points of a shape as traversable area.
| Name | Type | Default |
|---|---|---|
shapeOutline | ReadOnlySpan<Vector2> | — |
AppendObstructionOutlinesvoid
public void AppendObstructionOutlines(Reckfell.Collections.Array<Vector2[]> obstructionOutlines);Appends another array of obstruction_outlines at the end of the existing obstruction outlines array.
| Name | Type | Default |
|---|---|---|
obstructionOutlines | Reckfell.Collections.Array<Vector2[]> | — |
AppendTraversableOutlinesvoid
public void AppendTraversableOutlines(Reckfell.Collections.Array<Vector2[]> traversableOutlines);Appends another array of traversable_outlines at the end of the existing traversable outlines array.
| Name | Type | Default |
|---|---|---|
traversableOutlines | Reckfell.Collections.Array<Vector2[]> | — |
Clearvoid
public void Clear();Clears the internal data.
ClearProjectedObstructionsvoid
public void ClearProjectedObstructions();Clears all projected obstructions.
GetBoundsRect2
public Rect2 GetBounds();Returns an axis-aligned bounding box that covers all the stored geometry data. The bounds are calculated when calling this function with the result cached until further geometry changes are made.
Rect2GetObstructionOutlinesReckfell.Collections.Array<Vector2[]>
public Reckfell.Collections.Array<Vector2[]> GetObstructionOutlines();Returns all the obstructed area outlines arrays.
Reckfell.Collections.Array<Vector2[]>GetProjectedObstructionsReckfell.Collections.Array
public Reckfell.Collections.Array GetProjectedObstructions();Returns the projected obstructions as an Reckfell.Collections.Array of dictionaries. Each Reckfell.Collections.Dictionary contains the following entries:
vertices- Afloat[]that defines the outline points of the projected shape.carve- A [bool] that defines how the projected shape affects the navigation mesh baking. Iftruethe projected shape will not be affected by addition offsets, e.g. agent radius.
Reckfell.Collections.ArrayGetTraversableOutlinesReckfell.Collections.Array<Vector2[]>
public Reckfell.Collections.Array<Vector2[]> GetTraversableOutlines();Returns all the traversable area outlines arrays.
Reckfell.Collections.Array<Vector2[]>HasDatabool
public bool HasData();Returns true when parsed source geometry data exists.
boolMergevoid
public void Merge(NavigationMeshSourceGeometryData2D otherGeometry);Adds the geometry data of another NavigationMeshSourceGeometryData2D to the navigation mesh baking data.
| Name | Type | Default |
|---|---|---|
otherGeometry | NavigationMeshSourceGeometryData2D | — |
SetObstructionOutlinesvoid
public void SetObstructionOutlines(Reckfell.Collections.Array<Vector2[]> obstructionOutlines);Sets all the obstructed area outlines arrays.
| Name | Type | Default |
|---|---|---|
obstructionOutlines | Reckfell.Collections.Array<Vector2[]> | — |
SetProjectedObstructionsvoid
public void SetProjectedObstructions(Reckfell.Collections.Array projectedObstructions);Sets the projected obstructions with an Array of Dictionaries with the following key value pairs:
| Name | Type | Default |
|---|---|---|
projectedObstructions | Reckfell.Collections.Array | — |
SetTraversableOutlinesvoid
public void SetTraversableOutlines(Reckfell.Collections.Array<Vector2[]> traversableOutlines);Sets all the traversable area outlines arrays.
| Name | Type | Default |
|---|---|---|
traversableOutlines | Reckfell.Collections.Array<Vector2[]> | — |