I’m a newcomer to the unreal engine and also interested in making a game with modding capability. As I understood UE4 enable the modding capability via the plugin system, So I looked into this plugin \UE_4.22\Engine\Plugins\Editor\PluginBrowser and the “PluginManager.cpp”
I think UE4 capable of loading a plugin that is unknown at the build time if you placed it in the “GameFolder/Mods” following code snippet is copied from “PluginManager.cpp”
if (Project != nullptr)
{
// Always add the mods from the loose directory without using manifests, because they're not packaged together.
ReadPluginsInDirectory(FPaths::ProjectModsDir(), EPluginType::Mod, Plugins);
// If they have a list of additional directories to check, add those plugins too
for (const FString& Dir : Project->GetAdditionalPluginDirectories())
{
ReadPluginsInDirectory(Dir, EPluginType::External, Plugins);
}
// Add plugins from FPaths::EnterprisePluginsDir if it exists
if (FPaths::DirectoryExists(FPaths::EnterprisePluginsDir()))
{
ReadPluginsInDirectory(FPaths::EnterprisePluginsDir(), EPluginType::Enterprise, Plugins);
}
}
I also tried the manual .pak file mounting which is capable of loading a .pak file from the given location following this repository. It only loaded the assets which are placed in the plugin content folder. but when I placed the .pak file into the “Content/Paks” all assets are loaded correctly. I think it messed up with asset paths stored in Assestregistry.bin when I placed the .pak file other than the “Content/Paks”.
By trying both approaches I realized that Mod Developer should store all its content in Plugin Content folder ( I’m also interested in avoiding this behaviour)
please correct me if I am wrong about UE4 Mod/DLC System I’m Still new to the Framework.