[C++][UE5.1] Unable to open Unreal Project after adding the "Common Input" subsystem

I want to use the Common Input Subsystem to be able to check what input type is being used by the player (Gamepad, Mouse and Keyboard, etc.).

I have added the following module in the build.cs :

PublicDependencyModuleNames.Add (“CommonInput”);

And I have added the following include in my PlayerClass.cpp:

include “CommonInputSubsystem.h”

Example of how I’m using the CommonInputSubsystem:

const bool bIsUsingGamepad = CommonInputSubsystem->GetCurrentInputType() == ECommonInputType::Gamepad;

However whenever I try to open my project after compiling (compile successful), I get the following error on boot:
The game module ‘MyGame’ could not be loaded. There may be an operating system error, the module may not be properly set up, or a plugin which has been included into the build has not been turned on

I have tried adding “CommonInput” as a plugin, but it doesn’t seem to exist.

Any Idea?

1 Like

For any people getting the same error, you need the “Common UI” Plugin to be active.

It’s really not indicated anywere on the common input subsystem but that fixes the problem, at the cost of you using the Common UI plugin.

4 Likes