Hey,
UE4 provides this UE4 Default BP Character, which is automatically created when I hit “Play” in the UE4 Editor.
As far as I know, the following code, creates the character for me:
static ConstructorHelpers::FObjectFinder<UClass> PlayerPawnBPClass(TEXT("Class'/Game/Blueprints/MyCharacter.MyCharacter_C'"));
if (PlayerPawnBPClass.Object != NULL)
{
DefaultPawnClass = PlayerPawnBPClass.Object;
}
My Question is:
How do I get the Actor from this Code?, because I need the Actor from it and add it to a TArray
.
I thought the DefaultPawnClass
is the key, but somehow I can’t find any solution.
Another Question:
Is this actually the right way to add my Character / Actors to the map?
Because I’ve also read a lot about the SpawnActor functions…
Can anyone help?