No, the .uproject / .uplugin aren’t directly involved in the build process. The module will be built whether it’s enabled or not in the .uproject / .uplugin file, so long as it’s added in the dependencies inside the Build.cs (This is also why compiling the source engine the first time takes so long even though you aren’t even using 10% of it). For example, if you build YourGame and you have a YourPlugin, you would need YourPlugin to be added to the Public/PrivateDependencyModuleNames list in YourGame.Build.cs for it to be built along side YourGame, the .uproject / .uplugin files won’t change this process.
It does however tells the applications loading it whether it should be using the module, how it should use it and when it should be loaded. Example:
"Modules":
{
"Name": "OnlineSubsystemSteam",
"Type": "Runtime",
"LoadingPhase": "Default",
"WhitelistPlatforms" :
"Win32",
"Win64",
"Mac",
"Linux"
]
}
]
How the application uses that information depends only on the application itself.
In the case of the Unreal Editor, something like the “WhilelistPlatforms” tells the editor to not use the module if you are running the game for a platform other than the whitelisted platforms.
It can also tell the Unreal Automation Tool (UAT) that the module shouldn’t be packaged in a non-whitelisted platform package.
Beside that, it gives information to the application running it. For example, you can tell the editor that there is an enabled and installed plugin through the .uproject / .uplugin files so the editor can add it to its list of plugins for easy plugin management to avoid people fiddling directly with the files themselves.
A good example to give is if you look at a .uplugin file like the OnlineSubsystemSteam.uplugin:
"FriendlyName" : "Online Subsystem Steam",
"Version" : 1,
"VersionName" : "1.0",
"Description" : "Access to Steam platform",
"Category" : "Online Platform",
"CreatedBy" : "Epic Games, Inc.",
"CreatedByURL" : "http://epicgames.com",
"EnabledByDefault" : false,
The Unreal editor would read this and when looking in the plugin list for the OnlineSubsystemSteam, you’d see like the picture attached to this post.
You may notice that when building for a different target using the source engine, the engine will build some files that weren’t being built before. That is because the .Build.cs of many of the engine’s modules have platform specific code that will only be called depending on which platform you are targeting using “Target.Platform”. You can use “Target.Platform” to also tell the build tools in your module .Build.cs which libraries and DLLs to include depending on the target, using “PublicAdditionalLibraries”, “PublicDelayLoadDLLs”, etc. or which file should be copied to a package build with “RuntimeDependencies”. You can find more info here.