NavigationMeshBuilder Class
Namespace: Stride.NavigationAssembly: Stride.Navigation.dll
Incremental navigation mesh builder. Builds the navigation mesh in individual tiles
public class NavigationMeshBuilder
Name | Description | |
---|---|---|
Constructors | ||
NavigationMeshBuilder(NavigationMesh) | Initializes the builder, optionally with a previous navigation mesh when building incrementally |
|
Fields | ||
Logger | The logger to send additional information to |
|
Methods | ||
Add(StaticColliderData) | Adds information about a collider to this builder |
|
Build(NavigationMeshBuildSettings, ICollection<NavigationMeshGroup>, CollisionFilterGroupFlags, ICollection<BoundingBox>, CancellationToken) | Performs the build of a navigation mesh |
|
Remove(StaticColliderData) | Removes a specific collider from the builder |
Constructors
NavigationMeshBuilder(NavigationMesh)
Initializes the builder, optionally with a previous navigation mesh when building incrementally
public NavigationMeshBuilder(NavigationMesh oldNavigationMesh = null)
Parameters
Type | Name | Description |
---|---|---|
NavigationMesh | oldNavigationMesh | The previous navigation mesh, to allow incremental builds |
Fields
Logger
The logger to send additional information to
public Logger Logger
Field Value
Type | Description |
---|---|
Logger |
Methods
Add(StaticColliderData)
Adds information about a collider to this builder
public void Add(StaticColliderData colliderData)
Parameters
Type | Name | Description |
---|---|---|
StaticColliderData | colliderData | A collider data object to add |
Remarks
You can only register a single StaticColliderComponent once
Exceptions
Type | Condition |
---|---|
System.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
Type | Name | Description |
---|---|---|
NavigationMeshBuildSettings | buildSettings | The build settings to pass to recast |
System.Collections.Generic.ICollection<NavigationMeshGroup> | groups | |
CollisionFilterGroupFlags | includedCollisionGroups | The collision groups that will affect which colliders are considered solid |
System.Collections.Generic.ICollection<BoundingBox> | boundingBoxes | A collection of bounding boxes to use as the region for which to generate navigation mesh tiles |
System.Threading.CancellationToken | cancellationToken | A cancellation token to interrupt the build process |
Returns
Type | Description |
---|---|
NavigationMeshBuildResult | The build result |
Remove(StaticColliderData)
Removes a specific collider from the builder
public void Remove(StaticColliderData colliderData)
Parameters
Type | Name | Description |
---|---|---|
StaticColliderData | colliderData | The collider data object to remove |