Navigation
Overview
The template’s navigation system is built on Unity’s NavMesh. Both Enemy and Player prefabs use the NavMesh Agent component, while obstacles rely on NavMesh Obstacle. Each Room Holder includes two NavMesh Surfaces — one dedicated to enemies and another to the player.
All code-level interactions with the NavMesh are performed through abstract classes, giving users the flexibility to replace the NavMesh system with a custom navigation solution if desired.
Navigation classes
There are two main navigation-related classes in the template:
NavigationHandler - an abstract class that controls movement behavior for enemies and the player.
Its NavMesh-based implementation is NavmeshNavigationHandler.
NavigationManager - an abstract class responsible for higher-level navigation operations and calculations.
Abilities often reference it to find available positions within the room.
Its NavMesh implementation is NavmeshNavigationManager, which is instantiated as a child of the StageController GameObject in the Game scene.
Last updated