DynamicNavigationMeshSystem Class
Namespace: Stride.NavigationAssembly: Stride.Navigation.dll
System that handles building of navigation meshes at runtime
public class DynamicNavigationMeshSystem : GameSystem, IDisposable, ICollectorHolder, IGameSystemBase, IComponent, IReferencable, IUpdateable, IDrawable, IContentable
| Name | Description | |
|---|---|---|
| Constructors | ||
| DynamicNavigationMeshSystem(IServiceRegistry) | ||
| Properties | ||
| AutomaticRebuild | If |
|
| BuildSettings | Build settings used by Recast |
|
| CurrentNavigationMesh | The most recently built navigation mesh |
|
| Groups | Settings for agents used with the dynamic navigation mesh |
|
| IncludedCollisionGroups | Collision filter that indicates which colliders are used in navmesh generation |
|
| Methods | ||
| Initialize() | ||
| InitializeSettingsFromGameSettings(GameSettings) | Copies the default settings from the GameSettings for building navigation |
|
| Rebuild() | Starts an asynchronous rebuild of the navigation mesh |
|
| Update(GameTime) | ||
| Events | ||
| NavigationMeshUpdated | Raised when the navigation mesh for the current scene is updated |
|
Constructors
DynamicNavigationMeshSystem(IServiceRegistry)
public DynamicNavigationMeshSystem(IServiceRegistry registry)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceRegistry | registry |
Properties
AutomaticRebuild
If true, this will automatically rebuild on addition/removal of static collider components
[DataMember(5)]
public bool AutomaticRebuild { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
BuildSettings
Build settings used by Recast
[DataMember(20)]
public NavigationMeshBuildSettings BuildSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| NavigationMeshBuildSettings |
CurrentNavigationMesh
The most recently built navigation mesh
public NavigationMesh CurrentNavigationMesh { get; }
Property Value
| Type | Description |
|---|---|
| NavigationMesh |
Groups
Settings for agents used with the dynamic navigation mesh
[DataMember(30)]
public List<NavigationMeshGroup> Groups { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.List<NavigationMeshGroup> |
IncludedCollisionGroups
Collision filter that indicates which colliders are used in navmesh generation
[DataMember(10)]
public CollisionFilterGroupFlags IncludedCollisionGroups { get; set; }
Property Value
| Type | Description |
|---|---|
| CollisionFilterGroupFlags |
Methods
Initialize()
public override void Initialize()
Overrides
InitializeSettingsFromGameSettings(GameSettings)
Copies the default settings from the GameSettings for building navigation
public void InitializeSettingsFromGameSettings(GameSettings gameSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| GameSettings | gameSettings |
Rebuild()
Starts an asynchronous rebuild of the navigation mesh
public async Task<NavigationMeshBuildResult> Rebuild()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<NavigationMeshBuildResult> |
Update(GameTime)
public override void Update(GameTime gameTime)
Parameters
| Type | Name | Description |
|---|---|---|
| GameTime | gameTime |
Overrides
| Improve this Doc View SourceEvents
NavigationMeshUpdated
Raised when the navigation mesh for the current scene is updated
public event EventHandler<NavigationMeshUpdatedEventArgs> NavigationMeshUpdated
Event Type
| Type | Description |
|---|---|
| System.EventHandler<NavigationMeshUpdatedEventArgs> |