From fcd7a4f890c1e0178f6950b91392de8843c66529 Mon Sep 17 00:00:00 2001
From: Timon Roemer <t.roemer@vis.rwth-aachen.de>
Date: Mon, 6 May 2024 16:27:53 +0200
Subject: [PATCH] Removes closing in case of missing InputComponent

---
 .../Private/Pawn/IntenSelectComponent.cpp           | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/Source/RWTHVRToolkit/Private/Pawn/IntenSelectComponent.cpp b/Source/RWTHVRToolkit/Private/Pawn/IntenSelectComponent.cpp
index a49bf068..83ca45a1 100644
--- a/Source/RWTHVRToolkit/Private/Pawn/IntenSelectComponent.cpp
+++ b/Source/RWTHVRToolkit/Private/Pawn/IntenSelectComponent.cpp
@@ -59,14 +59,13 @@ void UIntenSelectComponent::InitInputBindings()
 	// Check if the enhanced input component is valid
 	if (!PEI)
 	{
-		// Display an error message and quit the game if the enhanced input component is not found
+		// Display an error message and deactivate if the enhanced input component is not found
 		const FString Message = "Could not get PlayerInputComponent for IntenSelect Input Assignment!";
-#if WITH_EDITOR
-		const FText Title = FText::FromString(FString("ERROR"));
-		FMessageDialog::Open(EAppMsgType::Ok, FText::FromString(Message), Title);
-#endif
-		UE_LOG(LogTemp, Error, TEXT("%s"), *Message)
-		UKismetSystemLibrary::QuitGame(this, nullptr, EQuitPreference::Quit, false);
+
+		UE_LOG(LogTemp, Error, TEXT("%s"), *Message);
+		//Deactivate 
+
+		Super::SetActive(false, true);
 		return;
 	}
 
-- 
GitLab