I’m just getting started with modules, creating one for my loading screen.
(I took inspiration from this unreal talk: Async Loading Screens and Transition Levels | Unreal Fest Europe 2019 | Unreal Engine | Talks and demos )
The problem is, as soon as I call
FModuleManager::GetModuleChecked<FBSLoadingScreenModule>(...)
To execute some logic from my module, an assertion fails that the modules is loaded:
checkf(ModuleManager.IsModuleLoaded(ModuleName), TEXT("Tried to get module interface for unloaded module: '%s'"), *(ModuleName.ToString()));
This is my module build.cs file:
using UnrealBuildTool;
public class BSLoadingScreen: ModuleRules
{
public BSLoadingScreen(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[]
{
"Core",
"CoreUObject",
"Engine",
"Slate",
"SlateCore",
"MoviePlayer",
"UMG"
});
//The path for the header files
PublicIncludePaths.AddRange(new string[] { "BSLoadingScreen/Public" });
//The path for the source files
PrivateIncludePaths.AddRange(new string[] { "BSLoadingScreen/Private" });
}
}
In my project build.cs file I add a dependency like this:
PublicDependencyModuleNames.AddRange(new string[] { "BSLoadingScreen"});
And my module is loaded in my .uproject file like this:
{
"Name": "BSLoadingScreen",
"Type": "ClientOnly",
"LoadingPhase": "PreLoadingScreen"
}
Is there something I forgot to do in order to load the module? I do not think I have to call LoadModule explicitly?
Thanks in advance