diff --git a/Source/Flow/Private/Nodes/Graph/FlowNode_FormatText.cpp b/Source/Flow/Private/Nodes/Graph/FlowNode_FormatText.cpp index 0bae1f05..ea6babf0 100644 --- a/Source/Flow/Private/Nodes/Graph/FlowNode_FormatText.cpp +++ b/Source/Flow/Private/Nodes/Graph/FlowNode_FormatText.cpp @@ -24,7 +24,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)) { @@ -39,15 +39,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 95d4f98e..d018ab36 100644 --- a/Source/Flow/Public/Nodes/Graph/FlowNode_FormatText.h +++ b/Source/Flow/Public/Nodes/Graph/FlowNode_FormatText.h @@ -33,7 +33,7 @@ class FLOW_API UFlowNode_FormatText : public UFlowNode_DefineProperties #endif protected: - EFlowDataPinResolveResult TryResolveFormatText(const FName& PinName, FText& OutFormattedText) const; + EFlowDataPinResolveResult TryResolveFormattedText(const FName& PinName, FText& OutFormattedText) const; public: // IFlowDataPinValueSupplierInterface