Removing unused engine modules from the packaged build?

Our game doesn’t use Navigation at all, and it’s disabled in project settings, but profiling shows that there is still significant overhead from running NavigationSystem code. A cursory look at engine source code shows that NavigationSystem is a module designed to be swapped out and/or removed, so I would like to remove it.

How to make sure a module doesn’t get included? To be clear, I am talking about an engine module, not a plugin.

I have attempted to remove all plugins that depend on it from the .uproject, but module list still shows NavigationSystem being loaded. This involved searching through build.cs files, though, and it’s possible I missed something. Does UnrealBuildTool provide a way to view dependents of a module? Or, are modules somehow included even if they have no dependents?

Ideally, I would like to do this without modifying engine source; i.e. be able to package the game with a plain launcher build.

1 Like