From d81474c5a7a0453465af2d8f140567feb2c80658 Mon Sep 17 00:00:00 2001
From: Timon Roemer <t.roemer@vis.rwth-aachen.de>
Date: Wed, 8 May 2024 13:23:10 +0200
Subject: [PATCH] Removes closing from Utility Error Message function

---
 .../Interactables/IntenSelect/IntenSelectable.cpp            | 5 ++---
 Source/RWTHVRToolkit/Private/Utility/RWTHVRUtilities.cpp     | 3 +--
 Source/RWTHVRToolkit/Public/Utility/RWTHVRUtilities.h        | 2 +-
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/Source/RWTHVRToolkit/Private/Interaction/Interactables/IntenSelect/IntenSelectable.cpp b/Source/RWTHVRToolkit/Private/Interaction/Interactables/IntenSelect/IntenSelectable.cpp
index fef2fd78..b0ea685f 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 de278bc7..ac9860ee 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 c6b54733..2ba03cc0 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);
 };
-- 
GitLab