Adding components to Shooter Game Sample actors?

I’ve been tasked with adding an ability into the Shooter Game Sample system.

I’ve written up the ability, tested it in a first person environment, and verified it works great. …Unfortunately, I wrote it so that the input component is dependent on the player pawn.

I’m trying to attach this actor component file to the player pawn in the Shooter Game Sample and can’t seem to edit/gain access to the player pawn being used. All of the guides and tutorials I’ve found have suggested selecting the player pawn in-use and converting it to a new BP, but that results in Unreal crashing to desktop.

Does anyone have a suggestion on how I can work around this?

Thank you!

What do you mean “gain access” also can you provide logs from Saved/Logs after crash?

I’m launching the First Person Shooter sample game in UE4.20.3. I’ve coded up an Actor Component that I want to attach to the PlayerPawn. When I view the PlayerPawn blueprint from the content browser, it’s empty.

When I try to find the actor in runtime and create a new blueprint from it, Unreal crashes to the desktop.

  • Launch the game.
  • Press “compile”.
  • Press “play”.
  • Press Shift + F1 to get control of the mouse.
  • Select “PlayerPawn” from the world view.
  • Click “Blueprint” from the toolbar.
  • Click “Convert Actor to Blueprint”.
  • Observe the crash to desktop.

[link text][3]

I managed to solve my original problem. I was able to add the C++ Actor Component I created to the existing Shooter Game PlayerPawn by adding a component object directly to the ShooterPlayerCharacter.cpp file.

AShooterCharacter::AShooterCharacter(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer.SetDefaultSubobjectClass<UShooterCharacterMovement>(ACharacter::CharacterMovementComponentName))
{
	Mesh1P = ObjectInitializer.CreateDefaultSubobject<USkeletalMeshComponent>(this, TEXT("PawnMesh1P"));
	Mesh1P->SetupAttachment(GetCapsuleComponent());
	Mesh1P->bOnlyOwnerSee = true;
	Mesh1P->bOwnerNoSee = false;

	MyAbility = ObjectInitializer.CreateDefaultSubobject<UShooterMyAbility>(this, TEXT("My New Ability"));
}

When I run the game in the editor, I can now select the PlayerPawn and see the desired component attached.

The crash still occurs when I try to convert the PlayerPawn actor to a Blueprint but such is life.