3#include "Kismet/BlueprintFunctionLibrary.h"
9#include "DlgManager.generated.h"
19 GENERATED_USTRUCT_BODY()
22 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Data")
47 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Launch", meta = (WorldContext =
"WorldContextObject"))
62 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Launch")
65 return StartDialogueWithContext(TEXT(
"StartDialogue"),
Dialogue, Participants);
73 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Launch")
74 static bool CanStartDialogue(
UDlgDialogue*
Dialogue, UPARAM(ref)
const TArray<UObject*>& Participants);
96 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Launch")
99 UPARAM(ref)
const TArray<UObject*>& Participants,
100 UPARAM(
DisplayName=
"Start Node Index") int32 StartIndex,
101 const TSet<int32>& AlreadyVisitedNodes,
102 bool bFireEnterEvents
123 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Launch")
126 UPARAM(ref)
const TArray<UObject*>& Participants,
127 const FGuid& StartNodeGUID,
128 const TSet<FGuid>& AlreadyVisitedNodes,
129 bool bFireEnterEvents
139 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Launch")
144 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Launch")
149 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Launch")
154 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Launch")
161 static int32 LoadAllDialoguesIntoMemory(
bool bAsync =
false);
164 static TArray<UDlgDialogue*> GetAllDialoguesFromMemory();
167 static TArray<TWeakObjectPtr<AActor>> GetAllWeakActorsWithDialogueParticipantInterface(UWorld* World);
170 UFUNCTION(BlueprintPure, Category =
"Dialogue|Helper", meta = (WorldContext =
"WorldContextObject"))
171 static TArray<UObject*> GetAllObjectsWithDialogueParticipantInterface(
UObject* WorldContextObject);
176 UFUNCTION(BlueprintPure, Category =
"Dialogue|Helper", meta = (WorldContext =
"WorldContextObject"))
177 static TMap<FName, FDlgObjectsArray> GetAllObjectsMapWithDialogueParticipantInterface(
UObject* WorldContextObject);
180 static TArray<UDlgDialogue*> GetDialoguesWithDuplicateGUIDs();
183 static TMap<FGuid, UDlgDialogue*> GetAllDialoguesGUIDsMap();
186 static TArray<UDlgDialogue*> GetAllDialoguesForParticipantName(FName ParticipantName);
189 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Memory")
190 static void SetDialogueHistory(
const TMap<FGuid, FDlgHistory>& DlgHistory);
193 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Memory")
194 static void ClearDialogueHistory();
197 UFUNCTION(BlueprintPure, Category =
"Dialogue|Memory")
198 static const TMap<FGuid, FDlgHistory>& GetDialogueHistory();
201 UFUNCTION(BlueprintPure, Category =
"Dialogue|Helper")
202 static bool DoesObjectImplementDialogueParticipantInterface(
const UObject*
Object);
205 UFUNCTION(BlueprintPure, Category =
"Dialogue|Helper",
DisplayName =
"Is Object A Custom Event")
209 UFUNCTION(BlueprintPure, Category =
"Dialogue|Helper",
DisplayName =
"Is Object A Custom Condition")
213 UFUNCTION(BlueprintPure, Category =
"Dialogue|Helper",
DisplayName =
"Is Object A Custom Text Argument")
214 static bool IsObjectACustomTextArgument(
const UObject*
Object);
217 UFUNCTION(BlueprintPure, Category =
"Dialogue|Helper",
DisplayName =
"Is Object A Node Data")
221 UFUNCTION(BlueprintPure, Category =
"Dialogue|Data")
222 static void GetAllDialoguesParticipantNames(TArray<FName>& OutArray);
225 UFUNCTION(BlueprintPure, Category =
"Dialogue|Data")
226 static void GetAllDialoguesSpeakerStates(TArray<FName>& OutArray);
229 UFUNCTION(BlueprintPure, Category =
"Dialogue|Data")
230 static void GetAllDialoguesIntNames(FName ParticipantName, TArray<FName>& OutArray);
233 UFUNCTION(BlueprintPure, Category =
"Dialogue|Data")
234 static void GetAllDialoguesFloatNames(FName ParticipantName, TArray<FName>& OutArray);
237 UFUNCTION(BlueprintPure, Category =
"Dialogue|Data")
238 static void GetAllDialoguesBoolNames(FName ParticipantName, TArray<FName>& OutArray);
241 UFUNCTION(BlueprintPure, Category =
"Dialogue|Data")
242 static void GetAllDialoguesNameNames(FName ParticipantName, TArray<FName>& OutArray);
245 UFUNCTION(BlueprintPure, Category =
"Dialogue|Data")
246 static void GetAllDialoguesConditionNames(FName ParticipantName, TArray<FName>& OutArray);
249 UFUNCTION(BlueprintPure, Category =
"Dialogue|Data")
250 static void GetAllDialoguesEventNames(FName ParticipantName, TArray<FName>& OutArray);
255 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Console")
256 static bool RegisterDialogueConsoleCommands();
260 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Console")
261 static bool UnregisterDialogueConsoleCommands();
271 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Persistence")
272 static UWorld* GetDialogueWorld();
276 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Persistence")
277 static void SetDialoguePersistentWorldContextObject(
const UObject* WorldContextObject)
279 UserWorldContextObjectPtr = WorldContextObject;
282 UFUNCTION(BlueprintCallable, Category =
"Dialogue|Persistence")
283 static void ClearDialoguePersistentWorldContextObject()
285 UserWorldContextObjectPtr.Reset();
289 static void GatherParticipantsRecursive(
UObject*
Object, TArray<UObject*>&
Array, TSet<UObject*>& AlreadyVisited);
292 static TWeakObjectPtr<const UObject> UserWorldContextObjectPtr;
294 static bool bCalledLoadAllDialoguesIntoMemory;
UCLASS(BlueprintType, Meta = (DisplayThumbnail = "true"))
static UDlgContext * StartDialogue(UDlgDialogue *Dialogue, UPARAM(ref) const TArray< UObject * > &Participants)
UFUNCTION(BlueprintCallable, Category = "Dialogue|Launch")
static TWeakObjectPtr< const UObject > UserWorldContextObjectPtr
static void ClearDialoguePersistentWorldContextObject()
UFUNCTION(BlueprintCallable, Category = "Dialogue|Persistence")
static bool bCalledLoadAllDialoguesIntoMemory
static void SetDialoguePersistentWorldContextObject(const UObject *WorldContextObject)
UFUNCTION(BlueprintCallable, Category = "Dialogue|Persistence")
TArray< UObject * > Array
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Data")