Called AddMappingContext with a null Mapping Context! No changes have been applied.

I’ve been working on getting a first person character to work in C++ and I can get it to compile, but the player doesn’t move. I get a warning in UnrealLink in Rider that says, Called AddMappingContext with a null Mapping context. I’ve tried adding the mapping context in the Character Blueprint, but that didn’t seem to fix it either. The mapping context is the default for the first person template. Sort of new to C++, so not quite sure what the issue is. Any help would be appreciated.

2 Likes

Bumping this because I’m having the same issue. Trying to write a custom pawn and controller for the pawn entirely from scratch but can’t get my inputs to work. This warning is the only hint as to what’s wrong.

Oops I’m silly, of course I find the solution less than 10 minutes after finally giving up and posting about it.

I simply forgot to assign the context (and actions) to my pawn’s blueprint. Derp.

3 Likes

I did the same thing! Thanks for pointing it out

1 Like

我也遇到了相同的问题,我是在原有资产上创建一个新子类玩家,再创建新的游戏模式后发现角色无法移动,仔细分析后发现,问题在玩家控制器类,和默认pawn类是否符合预期,调整好后,问题解决,希望能帮到你。