Input not propagated to InputComponent in packaged game

Hi. I have a problem. My input is not working when I package the game. It works in Editor and when I run in standalone game. But when I package it the input doesnt work. At first I thought that it’s problem with focus but it’s not… console and alt+f4 were working. Then I added a PrintString into the Level Blueprint to check if the axis mapping was packaged… and it seems that worked…

I also wondered if the possession of player controller failed but that also works… (I think because the AI is trying to kill me and AI is finding the player using GetPlayerController->Get Controller Pawn… So it seems that the input is not propagated into the Actor or just into the UInputComponent… My custom Pawn has a custom UInputComponent (UPlayerInputComponent)… where I have setup all the inputs. I think that should be correct… also I checked that I call the SUPER everywhere… :

UPlayerInputComponent::UPlayerInputComponent(const FObjectInitializer & ObjectInitializer) :
	PrimaryComponentTick.bCanEverTick = true;
	PrimaryComponentTick.bStartWithTickEnabled = true;

	BindAxis("Forward", this, &UPlayerInputComponent::MoveForward);
	BindAxis("Right", this, &UPlayerInputComponent::TurnRight);
	BindAxis("CannonRotate", this, &UPlayerInputComponent::CannonRotate);
	BindAxis("Fire", this, &UPlayerInputComponent::Fire);

I have a PlayerTank and AITank… they derive from my Tank pawn and I just added to PlayerTank the PlayerInputComponent into the tree

EDIT1 : Also by debugging I figured out that I cannot see the PlayerInputComponent I created in the list of components that the pawn owns… it’s weird because the constructor was called… As I said I added a component in the overriden blueprint

1 Like