NavMeshLib
A helper NavMesh library for Lethal Company.
模組介紹 作者原文
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.
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.
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。
下面這些內容需要先安裝,否則該模組不會生效: