44 FString
GetDesc()
override {
return TEXT(
"INVALID DESCRIPTION"); }
50 static void AddReferencedObjects(
UObject* InThis, FReferenceCollector& Collector);
58 void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
override;
64 void PostEditChangeChainProperty(
struct FPropertyChangedChainEvent& PropertyChangedEvent)
override;
71 virtual FString GetNodeTypeString()
const {
return TEXT(
"INVALID"); }
75 void SetGraphNode(
UEdGraphNode* InNode) { GraphNode = InNode; }
76 void ClearGraphNode() { GraphNode =
nullptr; }
81 DECLARE_EVENT_TwoParams(
UDlgNode, FDialogueNodePropertyChanged,
const FPropertyChangedEvent& , int32 );
82 FDialogueNodePropertyChanged OnDialogueNodePropertyChanged;
84 virtual bool HandleNodeEnter(
UDlgContext& Context, TSet<const UDlgNode*> NodesEnteredWithThisStep);
85 virtual bool ReevaluateChildren(
UDlgContext& Context, TSet<const UDlgNode*> AlreadyEvaluated);
87 virtual bool CheckNodeEnterConditions(
const UDlgContext& Context, TSet<const UDlgNode*> AlreadyVisitedNodes)
const;
88 bool HasAnySatisfiedChild(
const UDlgContext& Context, TSet<const UDlgNode*> AlreadyVisitedNodes)
const;
90 virtual bool OptionSelected(int32 OptionIndex,
UDlgContext& Context);
96 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
97 FGuid
GetGUID()
const {
return NodeGUID; }
99 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
100 bool HasGUID()
const {
return NodeGUID.IsValid(); }
104 NodeGUID = FGuid::NewGuid();
112 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
113 virtual FName GetNodeParticipantName()
const {
return OwnerName; }
115 virtual void SetNodeParticipantName(FName InName) { OwnerName = InName; }
121 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
122 virtual
bool HasAnyEnterConditions()
const {
return GetNodeEnterConditions().Num() > 0; }
124 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
125 virtual const TArray<
FDlgCondition>& GetNodeEnterConditions()
const {
return EnterConditions; }
127 virtual void SetNodeEnterConditions(
const TArray<FDlgCondition>& InEnterConditions) { EnterConditions = InEnterConditions; }
130 virtual FDlgCondition* GetMutableEnterConditionAt(int32 EnterConditionIndex)
132 check(EnterConditions.IsValidIndex(EnterConditionIndex));
133 return &EnterConditions[EnterConditionIndex];
140 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
141 virtual
bool HasAnyEnterEvents()
const {
return GetNodeEnterEvents().Num() > 0; }
143 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
144 virtual const TArray<
FDlgEvent>& GetNodeEnterEvents()
const {
return EnterEvents; }
146 virtual void SetNodeEnterEvents(
const TArray<FDlgEvent>& InEnterEvents) { EnterEvents = InEnterEvents; }
154 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
155 virtual const TArray<
FDlgEdge>& GetNodeChildren()
const {
return Children; }
156 virtual void SetNodeChildren(
const TArray<FDlgEdge>& InChildren) { Children = InChildren; }
158 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
159 virtual int32 GetNumNodeChildren()
const {
return Children.Num(); }
161 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
162 virtual const
FDlgEdge& GetNodeChildAt(int32 EdgeIndex)
const {
return Children[EdgeIndex]; }
165 virtual void AddNodeChild(
const FDlgEdge& InChild) { Children.Add(InChild); }
168 virtual void RemoveChildAt(int32 EdgeIndex)
170 check(Children.IsValidIndex(EdgeIndex));
171 Children.RemoveAt(EdgeIndex);
175 virtual void RemoveAllChildren() { Children.Empty(); }
178 virtual FDlgEdge* GetSafeMutableNodeChildAt(int32 EdgeIndex)
180 check(Children.IsValidIndex(EdgeIndex));
181 return &Children[EdgeIndex];
185 virtual FDlgEdge* GetMutableNodeChildAt(int32 EdgeIndex)
187 return Children.IsValidIndex(EdgeIndex) ? &Children[EdgeIndex] :
nullptr;
191 virtual FDlgEdge* GetMutableNodeChildForTargetIndex(int32 TargetIndex);
194 const TArray<int32> GetNodeOpenChildren_DEPRECATED()
const;
197 virtual void GetAssociatedParticipants(TArray<FName>& OutArray)
const;
200 virtual void UpdateTextsValuesFromDefaultsAndRemappings(
205 virtual void UpdateTextsNamespacesAndKeys(
const UDlgSystemSettings& Settings,
bool bEdges,
bool bUpdateGraphNode =
true);
208 virtual void RebuildTextArguments(
bool bEdges,
bool bUpdateGraphNode =
true);
209 virtual void RebuildTextArgumentsFromPreview(
const FText& Preview) {}
212 virtual void RebuildConstructedText(
const UDlgContext& Context) {}
215 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
218 static TArray<FDlgTextArgument> EmptyArray;
223 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
224 virtual const
FText& GetNodeText()
const {
return FText::GetEmpty(); }
226 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
227 virtual
bool GetCheckChildrenOnEvaluation()
const {
return bCheckChildrenOnEvaluation; }
233 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
234 virtual const
FText& GetNodeUnformattedText()
const {
return GetNodeText(); }
237 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
238 USoundWave* GetNodeVoiceSoundWave() const;
241 UFUNCTION(BlueprintPure, Category = "
Dialogue|Node")
242 virtual USoundBase* GetNodeVoiceSoundBase()
const {
return nullptr; }
245 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
246 virtual UDialogueWave* GetNodeVoiceDialogueWave()
const {
return nullptr; }
249 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
250 virtual FName GetSpeakerState()
const {
return NAME_None; }
251 virtual void AddAllSpeakerStatesIntoSet(TSet<FName>& OutStates)
const {};
254 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
255 virtual
UObject* GetNodeGenericData()
const {
return nullptr; }
257 UFUNCTION(BlueprintPure, Category =
"Dialogue|Node")
258 virtual
UDlgNodeData* GetNodeData()
const {
return nullptr; }
264 static FName GetMemberNameOwnerName() {
return GET_MEMBER_NAME_CHECKED(
UDlgNode, OwnerName); }
265 static FName GetMemberNameCheckChildrenOnEvaluation() {
return GET_MEMBER_NAME_CHECKED(
UDlgNode, bCheckChildrenOnEvaluation); }
266 static FName GetMemberNameEnterConditions() {
return GET_MEMBER_NAME_CHECKED(
UDlgNode, EnterConditions); }
267 static FName GetMemberNameEnterEvents() {
return GET_MEMBER_NAME_CHECKED(
UDlgNode, EnterEvents); }
268 static FName GetMemberNameChildren() {
return GET_MEMBER_NAME_CHECKED(
UDlgNode, Children); }
269 static FName GetMemberNameGUID() {
return GET_MEMBER_NAME_CHECKED(
UDlgNode, NodeGUID); }
272 void UpdateGraphNode();
278#if WITH_EDITORONLY_DATA
280 UPROPERTY(Meta = (DlgNoExport))
284 int32 BroadcastPropertyEdgeIndexChanged = INDEX_NONE;
288 UPROPERTY(EditAnywhere, Category =
"Dialogue|Node", Meta = (
DisplayName =
"Participant Name"))
295 UPROPERTY(EditAnywhere, Category = "
Dialogue|Node")
296 bool bCheckChildrenOnEvaluation = false;
299 UPROPERTY(EditAnywhere, Category = "
Dialogue|Node")
303 UPROPERTY(EditAnywhere, Category = "
Dialogue|Node")
308 UPROPERTY(VisibleAnywhere, Category = "
Dialogue|Node", AdvancedDisplay)
313 UPROPERTY(VisibleAnywhere, EditFixedSize, AdvancedDisplay, Category = "
Dialogue|Node")