Table of Contents

Class DynamicNavigationMeshSystem

Namespace
Stride.Navigation
Assembly
Stride.Navigation.dll

System that handles building of navigation meshes at runtime

public class DynamicNavigationMeshSystem : GameSystem, IDisposable, ICollectorHolder, IGameSystemBase, IComponent, IReferencable, IUpdateable, IDrawable, IContentable
Inheritance
DynamicNavigationMeshSystem
Implements
Inherited Members
Extension Methods

Constructors

DynamicNavigationMeshSystem(IServiceRegistry)

public DynamicNavigationMeshSystem(IServiceRegistry registry)

Parameters

registry IServiceRegistry

Properties

AutomaticRebuild

If true, this will automatically rebuild on addition/removal of static collider components

[DataMember(5)]
public bool AutomaticRebuild { get; set; }

Property Value

bool

BuildSettings

Build settings used by Recast

[DataMember(20)]
public NavigationMeshBuildSettings BuildSettings { get; set; }

Property Value

NavigationMeshBuildSettings

CurrentNavigationMesh

The most recently built navigation mesh

public NavigationMesh CurrentNavigationMesh { get; }

Property Value

NavigationMesh

Groups

Settings for agents used with the dynamic navigation mesh

[DataMember(30)]
public List<NavigationMeshGroup> Groups { get; }

Property Value

List<NavigationMeshGroup>

IncludedCollisionGroups

Collision filter that indicates which colliders are used in navmesh generation

[DataMember(10)]
public CollisionFilterGroupFlags IncludedCollisionGroups { get; set; }

Property Value

CollisionFilterGroupFlags

Methods

Initialize()

This method is called when the component is added to the game.

public override void Initialize()

Remarks

This method can be used for tasks like querying for services the component needs and setting up non-graphics resources.

InitializeSettingsFromGameSettings(GameSettings)

Copies the default settings from the GameSettings for building navigation

public void InitializeSettingsFromGameSettings(GameSettings gameSettings)

Parameters

gameSettings GameSettings

Rebuild()

Starts an asynchronous rebuild of the navigation mesh

public Task<NavigationMeshBuildResult> Rebuild()

Returns

Task<NavigationMeshBuildResult>

Update(GameTime)

This method is called when this game component is updated.

public override void Update(GameTime gameTime)

Parameters

gameTime GameTime

The current timing.

Events

NavigationMeshUpdated

Raised when the navigation mesh for the current scene is updated

public event EventHandler<NavigationMeshUpdatedEventArgs> NavigationMeshUpdated

Event Type

EventHandler<NavigationMeshUpdatedEventArgs>