Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
NavMeshLib
A helper NavMesh library for Lethal Company.
| Date uploaded | 4 days ago |
| Version | 3.2.3 |
| Download link | TRizzle-NavMeshLib-3.2.3.zip |
| Downloads | 2024 |
| Dependency string | TRizzle-NavMeshLib-3.2.3 |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2305README
NavMesh Lib
A library with some useful functions for working with Unity's NavMesh system.
Custom NavMesh Agent IDs
Unity NavMesh system has code for registering custom agent IDs at runtime, but Unity
devs never exposed the method to update the settings from their default values.
NavMesh Lib uses some harmony patches to work around this to allow custom monster makers
to give their enemies custom NavMesh settings.
Do be warned there is a performance cost for adding new agent IDs as NavMesh Lib
hast to generate NavMeshes for each ID added.
Scripts for Moon Makers
NavMesh Lib includes has some helper scripts for moon makers for interactions with custom agent types and allowing them to easily regenerate a moon's, (including interior's), NavMesh.
CustomNavMeshAgentHelper
A helper mono behavior that allows moon makers to set custom agent IDs at runtime.
Since NavMesh.CreateSettings can return a different ids at runtime.
We use CustomAgentManager.GetAgentIDFromSettingsName(string) to resolve the custom agent ID at runtime.
NavMeshUpdater
A helper mono behavior that allows moon makers to rebake the current scene's NavMesh.
You can customize how much of the NavMesh is regenerated:
AllSurfaces - Does what it says on the tin, rebakes all NavMeshSurfaces it can find.
ActiveSurfaces - Only rebakes all NavMeshSurfaces that are active and enabled.
OutsideSurfaces - Only rebakes NavMeshSurfaces parented to the OutsideLevelNavMesh.
InsideSurfaces - Only rebakes NavMeshSurfaces in the RoundManager.Instance.fullBakeSurfaces.
Custom - Allows you to specify which NavMeshSurfaces to rebake. WARNING: You are responsible for rebaking custom agent surfaces, if you use this, as well!
CustomNavMeshModifier
A helper mono behavior that allows moon makers to dynamically create NavMeshModifierVolume(s) for custom interiors, traps, and so much more.
You can customized where the modifier is parented to:
Interior - The modifier is parented to the Dungen object.
MoonEnvironment - The modifier is parented to the OutsideLevelNavMesh object.
Custom - The modifier is parented to the object you specify.
AutoNavLinkCreator
A helper mono behavior made to allow moon makers to automatically have NavMeshLinks created for custom agent types at runtime.
Since custom agent IDs are registered at runtime, custom NavMeshLinks must be created for them at runtime.
This allows moon makers and other modders to have the links auto created on object awake.
AutoNavSurfaceCreator
Same as AutoNavLinkCreator, but for NavMeshSurfaces
NavMeshLinkHelper
A helper mono behavior made to allow moon makers to use NavMeshLink's with transform's representing the start and end position like OffMeshLinks.
NavMesh Generation Improvements
NavMesh Lib also improves NavMesh generation by using UpdateNavMesh instead of BuildNavMesh.
Unity NavMesh generation is already multi-threaded but BuildNavMesh waits until the NavMesh is ready which block the main thread.
NavMesh Lib overrides base game NavMesh generation calls to use UpdateNavMesh which
allows Unity's main thread to keep running while still generating the new NavMesh in the background.
CHANGELOG
Changelog
3.2.3 - 2026-11-4
- The PathfindingLib dev has fixed the bug regarding disabled BuildNavMesh calls causing a thread deadlock. So, the hack regarding the bug has been removed.
3.2.2 - 2026-11-1
- Removed some debug logs that were left in the code by accident.....they would TANK performance
3.2.1 - 2026-11-1
- Fixed base game enemies breaking when Pathfinding Lib and Enemy Pathfinding Lag Fix is installed
3.2.0 - 2026-10-30
Just adding some more stuff to help out with Custom NavMeshAgent IDs. Anyhow, here is the stuff that was added or changed.
- Added AutoNavLinkCreator, A helper mono behavior made to allow moon makers to automatically have NavMeshLinks created for custom agent types at runtime. Since custom agent IDs are registered at runtime, custom NavMeshLinks must be created for them at runtime. This allows moon makers and other modders to have the links auto created on object awake.
- Added AutoNavSurfaceCreator, same as AutoNavLinkCreator, but for NavMeshSurfaces
- Added NavMeshLinkHelper, A helper mono behavior made to allow moon makers to use NavMeshLink's with transform's representing the start and end position like OffMeshLinks.
- Made some minor bug fixes to CustomNavMeshAgentHelper
- Added some logs to CustomNavMeshModifier and made a minor optimization
- Added a HACKY fix for PathfindingLib causing the game to hardcrash with NavMeshLinks that are set to automatically update......dev was informed, but no response was received at the time.
- Fixed Custom NavMesh Agents failing to path on any moon and interior since OffMeshLinks only work for the default agent ID......NavMeshLib will automatically create NavMeshLinks using prexisting OffMeshLinks found on levels.....this only happens after a moon is loaded and a dungeon is generated.
- Added an extention method that creates a NavMeshQueryFilter from an NavMeshAgent.
- Changed UpdateNavMeshDelayed to start UpdateNavMesh on all given NavMeshSurfaces rather than doing them one by one......this sped up NavMesh generation with no noticable impact on performance.
- Fixed some logic errors in IsValidPathToTarget
- For C# programmers, added CopyOffMeshLinks, CopyOffMeshLink, and AddMissingNavMeshSurfaces. XML documentation has been provided for these new methods.
3.1.0 - 2026-10-5
- Fixed CustomNavMeshModifier not rebaking the Navmesh if it was disabled or re-enabled.
- Fixed a bug with CustomNavMeshModifier.CreateFromColliders sometimes not creating and adding NavMeshUpdater to the newly created CustomNavMeshModifier.
3.0.0 - 2026-10-1
It's time for a requested feature that has been asked for a while now. The ability to dynamically create NavMeshModifierVolumes anything you want, for example, custom interiors, traps, and so much more.
- Added CustomNavMeshModifier, A helper mono behavior that allows for dynamic creation of NavMeshModifierVolume(s) for custom interiors, traps, and so much more.....
- Improved NavMeshUpdater and NavMeshUtil with a centralized BuildNavMeshAsync.
- Fixed a race condition that caused the interior to not render
2.0.0 - 2026-09-8
Had some people bring up to me a few improvements and inconsistencies with the API. This update exists to add said improvements.
- Made RebakeExteriorNavMesh and RebakeDunGenNavMesh consistent with BuildNavMeshAsync and UpdateNavMeshDelayed by giving them the same Action callbacks.
- Made a minor optimization to CustomNavMeshAgentHelper
- Gave NavMeshUpdater a new field environmentObject. Allows moon makers to specifiy the environmentObject themself.
1.0.0 - 2026-09-8
- Initial release