Add temporary fix for level loading
This commit is contained in:
parent
596bae1855
commit
9d32a0a0e3
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "PlayerCharacter.h"
|
||||
// You can remove these, this is just to get intellisense to work
|
||||
#include <string>
|
||||
#include <Components/CapsuleComponent.h>
|
||||
#include <Kismet/GameplayStatics.h>
|
||||
|
||||
|
@ -80,9 +81,11 @@ void APlayerCharacter::BeginPlay()
|
|||
|
||||
void APlayerCharacter::Destroyed()
|
||||
{
|
||||
Super::Destroyed();
|
||||
FString map = GetWorld()->GetMapName();
|
||||
map.RemoveFromStart("UEDPIE_0_"); // We have to remove this for reason, I don't fully understand at the moment
|
||||
UGameplayStatics::OpenLevel(this, FName(map), false);
|
||||
|
||||
UGameplayStatics::OpenLevel(GetWorld(), FName(GetWorld()->GetMapName()));
|
||||
Super::Destroyed();
|
||||
}
|
||||
|
||||
// Called every frame
|
||||
|
|
Loading…
Reference in New Issue