Why am I unable to open the console command?

I can’t open the console after I click play. I’ve tried setting the console key to various different keys but it doesn’t make a difference. Does anyone have any ideas as to what might be wrong?

Hey Daveoh-

Thanks for the report. Which version of the engine are you in and are you using Play In Editor or Standalone Game?

Hey , I’m using 4.4.1 and I’m using Play In Editor. I’ve also been failing to receive any key input in my code, which might be a related issue.

How are you setting up your key bindings in your code? Would it be possible for you to supply the bit of code where you set up your key bindings so I can see if I can understand what is happening.

Sure. Is this enough? APawn input not working - C++ - Unreal Engine Forums

Hey Daveoh-

The action binding seems correct in your code. You may need to make sure that the project is referencing the correct game mode. In the Settings → World Settings window make sure that GameMode Override is set to the game mode you wish to use. You might also want to try testing a different functionality inside the functions you’ve bound. Something simple like a log message just to ensure it is working properly.

Cheers,

I have confirmed that my GameMode is overriding the default. I also set it to the project’s default GameMode. I also know that my pawn is running as I inserted UE_LOGs into each function (which I omitted in my forum post as clutter). I can see it runs SetupPlayerInputComponent() but doesn’t run any of the bound functions.

Got anything else I can try?

Many thanks,
Daveoh

Just as a clarification, did you set up the action mappings inside the Project Settings menu or solely in code?

Inside the project settings menu. They are in the DefaultInput.ini file as on the forum thread.

An option you could try would be to edit the functions that your inputs call to add the UFUNCTION tag. Here’s a brief example, assuming you want to make the functions callable inside blueprints:

UFUNCTION(BlueprintCallable , Category = Power)
void CollectBatteries();

That hasn’t helped unfortunately. I don’t know what’s changed (if anything) but I checked GetOwner() and it returns NULL. I’ve replaced it with Controller instead, which I confirm points to my custom APlayerController class, but input is still not working.

It turns out that having a UMG widget displayed was preventing any kind of keyboard input to the game. Solution: Don’t display widget.

It turns out that having a UMG widget displayed was preventing any kind of keyboard input to the game.