Fix Level Switching Crash
This commit is contained in:
parent
f66dd3784c
commit
63b3ec0819
|
@ -35,7 +35,10 @@ void ALevelEndTriggerVolume::OnOverlapBegin(UPrimitiveComponent* OverlappedCompo
|
||||||
{
|
{
|
||||||
GetCollisionComponent()->OnComponentBeginOverlap.Clear();
|
GetCollisionComponent()->OnComponentBeginOverlap.Clear();
|
||||||
|
|
||||||
gameInstance->GetCurrentLevelManager()->LoadNextLevel(NextLevel);
|
if (!NextLevel.IsNull())
|
||||||
|
{
|
||||||
|
UGameplayStatics::OpenLevelBySoftObjectPtr(GetWorld(), NextLevel);
|
||||||
|
}
|
||||||
|
|
||||||
this->Destroy();
|
this->Destroy();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue