Table of Contents

Class NavigationMeshBuilder

Namespace
Stride.Navigation
Assembly
Stride.Navigation.dll

Incremental navigation mesh builder. Builds the navigation mesh in individual tiles

public class NavigationMeshBuilder
Inheritance
NavigationMeshBuilder

Constructors

NavigationMeshBuilder(NavigationMesh)

Initializes the builder, optionally with a previous navigation mesh when building incrementally

public NavigationMeshBuilder(NavigationMesh oldNavigationMesh = null)

Parameters

oldNavigationMesh NavigationMesh

The previous navigation mesh, to allow incremental builds

Fields

Logger

The logger to send additional information to

public Logger Logger

Field Value

Logger

Methods

Add(StaticColliderData)

Adds information about a collider to this builder

public void Add(StaticColliderData colliderData)

Parameters

colliderData StaticColliderData

A collider data object to add

Remarks

You can only register a single StaticColliderComponent once

Exceptions

InvalidOperationException

When trying to register collider data with the same StaticColliderComponent twice

Build(NavigationMeshBuildSettings, ICollection<NavigationMeshGroup>, CollisionFilterGroupFlags, ICollection<BoundingBox>, CancellationToken)

Performs the build of a navigation mesh

public NavigationMeshBuildResult Build(NavigationMeshBuildSettings buildSettings, ICollection<NavigationMeshGroup> groups, CollisionFilterGroupFlags includedCollisionGroups, ICollection<BoundingBox> boundingBoxes, CancellationToken cancellationToken)

Parameters

buildSettings NavigationMeshBuildSettings

The build settings to pass to recast

groups ICollection<NavigationMeshGroup>
includedCollisionGroups CollisionFilterGroupFlags

The collision groups that will affect which colliders are considered solid

boundingBoxes ICollection<BoundingBox>

A collection of bounding boxes to use as the region for which to generate navigation mesh tiles

cancellationToken CancellationToken

A cancellation token to interrupt the build process

Returns

NavigationMeshBuildResult

The build result

Remove(StaticColliderData)

Removes a specific collider from the builder

public void Remove(StaticColliderData colliderData)

Parameters

colliderData StaticColliderData

The collider data object to remove