| 1015 | } |
| 1016 | |
| 1017 | FFlowDataPinResult UFlowNodeBase::TryResolveDataPin(FName PinName) const |
| 1018 | { |
| 1019 | FFlowDataPinResult DataPinResult(EFlowDataPinResolveResult::Success); |
| 1020 | |
| 1021 | const UFlowNode* FlowNode = GetFlowNodeSelfOrOwner(); |
| 1022 | UFlowNode::TFlowPinValueSupplierDataArray PinValueSupplierDatas; |
| 1023 | if (!FlowNode->TryGetFlowDataPinSupplierDatasForPinName(PinName, PinValueSupplierDatas)) |
| 1024 | { |
| 1025 | // If we could not build the PinValueDataSuppliers array, |
| 1026 | // then the pin must be disconnected and have no default value available. |
| 1027 | DataPinResult.Result = EFlowDataPinResolveResult::FailedWithError; |
| 1028 | |
| 1029 | LogError(FString::Printf(TEXT("DataPin named '%s' could not be supplied with a value."), *PinName.ToString()), EFlowOnScreenMessageType::Temporary); |
| 1030 | |
| 1031 | return DataPinResult; |
| 1032 | } |
| 1033 | |
| 1034 | // Iterate over the suppliers in inverse order |
| 1035 | for (int32 Index = PinValueSupplierDatas.Num() - 1; Index >= 0; --Index) |
| 1036 | { |
| 1037 | const FFlowPinValueSupplierData& SupplierData = PinValueSupplierDatas[Index]; |
| 1038 | |
| 1039 | DataPinResult = SupplierData.PinValueSupplier->TrySupplyDataPin(SupplierData.SupplierPinName); |
| 1040 | |
| 1041 | if (FlowPinType::IsSuccess(DataPinResult.Result)) |
| 1042 | { |
| 1043 | return DataPinResult; |
| 1044 | } |
| 1045 | } |
| 1046 | |
| 1047 | return DataPinResult; |
| 1048 | } |
| 1049 | |
| 1050 | // #FlowDataPinLegacy |
| 1051 | FFlowDataPinResult_Bool UFlowNodeBase::TryResolveDataPinAsBool(const FName& PinName) const |
no test coverage detected