Hey there,
we are trying to work with modules. We are working on several small projects, but have code that is usefull for multiple projects. Thus we created a project which only reason to exist is to be a container for modules. This project seems to work as expected. Changes to the code will hotreload. For every module .dll the engine creates a hotreload file.
To make use of the modules within other projects, we use perforce to map in the modules. Every project that makes use of those modules, compiles them for itself. This way, every programmer is able to make changes to the module source files from every project. The module files get compiled with every project separately. This works as long as the editor is closed, cause the editor uses the normal .dll files on first boot. However, compiling while the editor is open, the hotreload files do not get created for the module .dlls. Thus the hotreload fails.
When compiling and the editor is open, unreal creates the file …/Game/Binaries/Win64/UE4Editor.modules. Here is how it looks:
{
"Changelist" : 3450819,
"CompatibleChangelist" : 3299760,
"BuildId" : "1ddcddb2-7ec6-4aa9-8a33-fc32d2a526e5",
"Modules" :
{
"VaseGenerator" : "UE4Editor-VaseGenerator-6436.dll",
"LogUtility" : "UE4Editor-LogUtility-5875.dll",
"ImportExport" : "UE4Editor-ImportExport-5875.dll",
"DebugHelper" : "UE4Editor-DebugHelper-5875.dll",
"MathExtension" : "UE4Editor-MathExtension-5875.dll",
"UtilityFunctions" : "UE4Editor-UtilityFunctions-5875.dll"
}
}
The module hotreload files are correctly listed, but are not created.
Here the Output log:
LogHotReload: New module detected: UE4Editor-VaseGenerator-4478.dll
LogHotReload: Starting Hot-Reload from IDE
LogSlate: Took 0.000120 seconds to synchronously load lazily loaded font '../../../Engine/Content/Slate/Fonts/Roboto-Light.ttf' (159K)
LogModuleManager:Warning: ModuleManager: Unable to load module 'C:/Users/vr3/Documents/Unreal Projects/GueWorkProj/PerforceWorkspace/GuenniVaseGenerator/VaseGenerator/Binaries/Win64/UE4Editor-VaseGenerator-4478.dll' because the file couldn't be loaded by the OS.
Warning: HotReload failed, reload failed /Script/VaseGenerator.
And the target.cs files:
using UnrealBuildTool;
using System.Collections.Generic;
public class VaseGeneratorEditorTarget : TargetRules
{
public VaseGeneratorEditorTarget(TargetInfo Target)
{
Type = TargetType.Editor;
}
//
// TargetRules interface.
//
public override void SetupBinaries(
TargetInfo Target,
ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
ref List<string> OutExtraModuleNames
)
{
OutExtraModuleNames.AddRange( new string[] { "VaseGenerator", "LogUtility", "ImportExport", "DebugHelper", "MathExtension" });
OutExtraModuleNames.AddRange( new string[] { "UtilityFunctions" });
}
}