Blockquote
I am spawning two pawns in the BeginPlay() in my game mode class like so:
FActorSpawnParameters SpawnParams;
SpawnParams.Owner = this;
SpawnParams.Instigator = Instigator;
FVector LeftPawnLocation = FVector(0, 2450, 1500);
FVector RightPawnLocation = FVector(0, -2450, 1500);
FRotator PawnRotation = FRotator(0.0f, 0.0f, 0.0f);
UWorld* const PongWorld = GetWorld();
if (PongWorld) {
FirstPlayer = PongWorld->SpawnActor<APongPaddlePawn>(LeftPawnLocation, PawnRotation, SpawnParams);
SecondPlayer = PongWorld->SpawnActor<APongPaddlePawn>(RightPawnLocation, PawnRotation, SpawnParams);
}
When I debug, i try to set the size of the pawns of FirstPlayer and SecondPlayer and they are both NULL. I can see the pawns showing up in my game. Why are they both NULL?