How to make modules in 4.22

Hi everyone,

Did someone succeed to make a module in 4.22 ?

I always have this log :

Incompatible or missing module: VRLabLoadingScreenModule

Still incompatible or missing module: VRLabLoadingScreenModule

And of course I can’t build my project (if I’m removing the module from the .uproject it works fine btw)

Here is my code :

.uproject

{
	"FileVersion": 3,
	"EngineAssociation": "4.22",
	"Category": "",
	"Description": "",
  "Modules": [
    {
      "Name": "VRLab",
      "Type": "Runtime",
      "LoadingPhase": "Default",
      "AdditionalDependencies": [
        "Engine",
        "HeadMountedDisplay",
        "UMG"
      ]
    },
    {
      "Name": "VRLabLoadingScreenModule",
      "Type": "Runtime",
      "LoadingPhase": "PreLoadingScreen"
    }
  ],
	"Plugins": [
		{
			"Name": "Composure",
			"Enabled": true
		},
		{
			"Name": "HoudiniEngine",
			"Enabled": false
		}
	],
	"TargetPlatforms": [
		"WindowsNoEditor"
	]
}

Module.Build.cs :

using UnrealBuildTool;

public class VRLabLoadingScreenModule : ModuleRules
{
    public VRLabLoadingScreenModule(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine" });

        PublicIncludePaths.AddRange(new string[] { "VRLabLoadingScreenModule/Public" });

        PrivateIncludePaths.AddRange(new string[] { "VRLabLoadingScreenModule/Private" });
    }
}

Module.h :

#pragma once

#include "ModuleManager.h"

DECLARE_LOG_CATEGORY_EXTERN(VRLabLoadingScreenModule, All, All);

class FVRLabLoadingScreenModule : public IModuleInterface
{

public:

	virtual void StartupModule() override;

	virtual void ShutdownModule() override;

};

Module.cpp :

#include "VRLabLoadingScreenModule.h"

DEFINE_LOG_CATEGORY(VRLabLoadingScreenModule);

#define LOCTEXT_NAMESPACE "FVRLabLoadingScreenModule"

void FVRLabLoadingScreenModule::StartupModule()
{
	UE_LOG(VRLabLoadingScreenModule, Warning, TEXT("Loading screen module started !"));
}

void FVRLabLoadingScreenModule::ShutdownModule()
{
	UE_LOG(VRLabLoadingScreenModule, Warning, TEXT("Loading screen module shutdowned !"));
}

#undef LOCTEXT_NAMESPACE

IMPLEMENT_MODULE(FVRLabLoadingScreenModule, VRLabLoadingScreenModule);

It’s the 42nd reviewed and I don’t think I missed something, so I think I’m missing something due to the 4.22.3 transition in the way to write modules. (And the official documentation is still on the 4.9 version of the engine so it’s useless)

Best regards everyone,

Alex,

PS: If someone from Epic’s could tell to Tim to put people on the documentation, it could be REALLY awesome. haha ^^

Sooooooo to avoid that “Missing Module” log you have to either :

  • Add your module in your Project.Build.cs in the PublicDependencyModuleNames.AddRange(…)
  • Add your module in your .uproject file under “Modules” ans your project entry inside “AdditionalDependencies”

And should be good to go.

Before you could do that in your Project.Target.cs but it’s not working anymore.

Best regards everyone,

Alex