From 54bffc911d1ce75b7d590232afbe48cf0f3221b6 Mon Sep 17 00:00:00 2001 From: dskliarov Date: Thu, 26 Feb 2026 19:27:18 +0200 Subject: [PATCH] Fixed Format Text node not supporting the Format Text input connection --- .../Flow/Private/Nodes/Graph/FlowNode_FormatText.cpp | 11 +++++++---- Source/Flow/Public/Nodes/Graph/FlowNode_FormatText.h | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Source/Flow/Private/Nodes/Graph/FlowNode_FormatText.cpp b/Source/Flow/Private/Nodes/Graph/FlowNode_FormatText.cpp index 5da5f18b..f13598b3 100644 --- a/Source/Flow/Private/Nodes/Graph/FlowNode_FormatText.cpp +++ b/Source/Flow/Private/Nodes/Graph/FlowNode_FormatText.cpp @@ -25,7 +25,7 @@ FFlowDataPinResult UFlowNode_FormatText::TrySupplyDataPin(FName PinName) const if (PinName == OUTPIN_TextOutput) { FText FormattedText; - const EFlowDataPinResolveResult FormatResult = TryResolveFormatText(PinName, FormattedText); + const EFlowDataPinResolveResult FormatResult = TryResolveFormattedText(PinName, FormattedText); if (FlowPinType::IsSuccess(FormatResult)) { @@ -40,15 +40,18 @@ FFlowDataPinResult UFlowNode_FormatText::TrySupplyDataPin(FName PinName) const return Super::TrySupplyDataPin(PinName); } -EFlowDataPinResolveResult UFlowNode_FormatText::TryResolveFormatText(const FName& PinName, FText& OutFormattedText) const +EFlowDataPinResolveResult UFlowNode_FormatText::TryResolveFormattedText(const FName& PinName, FText& OutFormattedText) const { - if (TryFormatTextWithNamedPropertiesAsParameters(FormatText, OutFormattedText)) + FText ResolvedFormatText = FormatText; + const EFlowDataPinResolveResult ResolveResult = TryResolveDataPinValue(GET_MEMBER_NAME_CHECKED(ThisClass, FormatText), ResolvedFormatText); + + if (TryFormatTextWithNamedPropertiesAsParameters(ResolvedFormatText, OutFormattedText)) { return EFlowDataPinResolveResult::Success; } else { - LogError(FString::Printf(TEXT("Could not format text '%s' with properties as parameters"), *FormatText.ToString()), EFlowOnScreenMessageType::Temporary); + LogError(FString::Printf(TEXT("Could not format text '%s' with properties as parameters"), *ResolvedFormatText.ToString()), EFlowOnScreenMessageType::Temporary); return EFlowDataPinResolveResult::FailedWithError; } diff --git a/Source/Flow/Public/Nodes/Graph/FlowNode_FormatText.h b/Source/Flow/Public/Nodes/Graph/FlowNode_FormatText.h index 85f7061e..c0c6ff5d 100644 --- a/Source/Flow/Public/Nodes/Graph/FlowNode_FormatText.h +++ b/Source/Flow/Public/Nodes/Graph/FlowNode_FormatText.h @@ -31,7 +31,7 @@ class FLOW_API UFlowNode_FormatText : public UFlowNode_DefineProperties protected: - EFlowDataPinResolveResult TryResolveFormatText(const FName& PinName, FText& OutFormattedText) const; + EFlowDataPinResolveResult TryResolveFormattedText(const FName& PinName, FText& OutFormattedText) const; public: // IFlowDataPinValueSupplierInterface