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();
 | 
			
		||||
 | 
			
		||||
			gameInstance->GetCurrentLevelManager()->LoadNextLevel(NextLevel);
 | 
			
		||||
			if (!NextLevel.IsNull())
 | 
			
		||||
			{
 | 
			
		||||
				UGameplayStatics::OpenLevelBySoftObjectPtr(GetWorld(), NextLevel);
 | 
			
		||||
			}			
 | 
			
		||||
 | 
			
		||||
			this->Destroy();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user