diff --git a/Source/RWTHVRToolkit/Private/Interaction/Interactables/IntenSelect/IntenSelectable.cpp b/Source/RWTHVRToolkit/Private/Interaction/Interactables/IntenSelect/IntenSelectable.cpp index fef2fd785f6c50d0a024a718530179886bcb6a0e..b0ea685f1871ff9091aaf46f0402fcb686bf12ec 100644 --- a/Source/RWTHVRToolkit/Private/Interaction/Interactables/IntenSelect/IntenSelectable.cpp +++ b/Source/RWTHVRToolkit/Private/Interaction/Interactables/IntenSelect/IntenSelectable.cpp @@ -43,9 +43,8 @@ void UIntenSelectable::BeginPlay() { if (ScoringBehaviours.Num() == 0) { - URWTHVRUtilities::ShowErrorAndQuit( - "Please assign the Scoring Behaviour manually when using more than one IntenSelectable Component!", - false, this); + URWTHVRUtilities::ShowEngineError( + "Please assign the Scoring Behaviour manually when using more than one IntenSelectable Component!"); } } else diff --git a/Source/RWTHVRToolkit/Private/Utility/RWTHVRUtilities.cpp b/Source/RWTHVRToolkit/Private/Utility/RWTHVRUtilities.cpp index de278bc769f3fb0334456868fb549d632f882839..ac9860ee687288726b9bc614e0c56fb00f3572c4 100644 --- a/Source/RWTHVRToolkit/Private/Utility/RWTHVRUtilities.cpp +++ b/Source/RWTHVRToolkit/Private/Utility/RWTHVRUtilities.cpp @@ -48,12 +48,11 @@ float URWTHVRUtilities::GetEyeDistance() return 0; } -void URWTHVRUtilities::ShowErrorAndQuit(UWorld* WorldContext, const FString& Message) +void URWTHVRUtilities::ShowEngineError(const FString& Message) { UE_LOG(Toolkit, Error, TEXT("%s"), *Message) #if WITH_EDITOR const FText Title = FText::FromString(FString("RUNTIME ERROR")); FMessageDialog::Open(EAppMsgType::Ok, FText::FromString(Message), Title); #endif - UKismetSystemLibrary::QuitGame(WorldContext, nullptr, EQuitPreference::Quit, false); } diff --git a/Source/RWTHVRToolkit/Public/Utility/RWTHVRUtilities.h b/Source/RWTHVRToolkit/Public/Utility/RWTHVRUtilities.h index c6b547336d00f2b88633806be95456597d2af12f..2ba03cc02d60e092bf827852e87c8e8fcbf27a66 100644 --- a/Source/RWTHVRToolkit/Public/Utility/RWTHVRUtilities.h +++ b/Source/RWTHVRToolkit/Public/Utility/RWTHVRUtilities.h @@ -31,5 +31,5 @@ public: static float GetEyeDistance(); UFUNCTION(BlueprintCallable) - static void ShowErrorAndQuit(UWorld* WorldContext, const FString& Message); + static void ShowEngineError(const FString& Message); };