For some reason I can add an Input Mapping Context to a character programically, but the same method won’t work for Input Action.
static ConstructorHelpers::FObjectFinder<UInputMappingContext> InputMappingContextAsset(TEXT("InputMappingContext'/Game/MyInputMappingContext.MyInputMappingContext'"));
if (InputMappingContextAsset.Succeeded())
{
MyInputMappingContext = InputMappingContextAsset.Object;
}
The above works but the below does not
static ConstructorHelpers::FObjectFinder<UInputAction> InputActionAsset(TEXT("InputAction'/Game/InputAction_MoveForward.InputAction_MoveForward'"));
if (InputActionAsset.Succeeded())
{
InputAction_MoveForward = InputActionAsset.Object;
}
I have the correct path. When the game is running in the editor, I can click the character and add this Input Action to it successfully in the details panel.
Any ideas why it wont work for an Input Action?