From ca87feaf2a3981b68ac4349b3fe3293300ee0280 Mon Sep 17 00:00:00 2001 From: PHILIP White Date: Tue, 14 Mar 2023 01:33:06 +0000 Subject: [PATCH] Bugfix Getting Wrong Widget for Dialogue --- Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp | 2 +- Source/the_twilight_abyss/Quest/QuestSystem.cpp | 2 +- Source/the_twilight_abyss/Quest/QuestSystem.h | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp b/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp index 9fdfed1..4630d66 100644 --- a/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp +++ b/Source/the_twilight_abyss/Dialogue/DialogueNPC.cpp @@ -13,7 +13,7 @@ UDialogueNPC::UDialogueNPC() // off to improve performance if you don't need them. PrimaryComponentTick.bCanEverTick = true; - static ConstructorHelpers::FClassFinder DialogueWidgetClass(TEXT("/Game/Blueprints/Quest_UI/Quest_UI")); + static ConstructorHelpers::FClassFinder DialogueWidgetClass(TEXT("/Game/Dialogue/TextPrompt")); DialogueWidget = DialogueWidgetClass.Class; } diff --git a/Source/the_twilight_abyss/Quest/QuestSystem.cpp b/Source/the_twilight_abyss/Quest/QuestSystem.cpp index d8c9c29..10e06da 100644 --- a/Source/the_twilight_abyss/Quest/QuestSystem.cpp +++ b/Source/the_twilight_abyss/Quest/QuestSystem.cpp @@ -11,7 +11,7 @@ UQuestSystem::UQuestSystem() // off to improve performance if you don't need them. PrimaryComponentTick.bCanEverTick = true; - static ConstructorHelpers::FClassFinder QuestWidgetClass(TEXT("/Game/Dialogue/TextPrompt")); + static ConstructorHelpers::FClassFinder QuestWidgetClass(TEXT("/Game/Quest_UI/Quest_UI")); QuestWidget = QuestWidgetClass.Class; } diff --git a/Source/the_twilight_abyss/Quest/QuestSystem.h b/Source/the_twilight_abyss/Quest/QuestSystem.h index 352333c..52979f0 100644 --- a/Source/the_twilight_abyss/Quest/QuestSystem.h +++ b/Source/the_twilight_abyss/Quest/QuestSystem.h @@ -5,8 +5,17 @@ #include "CoreMinimal.h" #include "Components/ActorComponent.h" #include "Components/TextBlock.h" +#include "Blueprint/UserWidget.h" #include "QuestSystem.generated.h" +// UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent)) +// class UQuest : public UObject +// { +// GENERATED_BODY() +// +// public: +// +// }; UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent)) class THE_TWILIGHT_ABYSS_API UQuestSystem : public UActorComponent