| 39 | #endif |
| 40 | |
| 41 | FFlowDataPinResult UFlowNode_Reroute::TrySupplyDataPin(FName PinName) const |
| 42 | { |
| 43 | const FFlowPin* InputPin = FindInputPinByName(UFlowNode::DefaultInputPin.PinName); |
| 44 | if (!InputPin) |
| 45 | { |
| 46 | return FFlowDataPinResult(EFlowDataPinResolveResult::FailedUnknownPin); |
| 47 | } |
| 48 | |
| 49 | FGuid FoundGuid; |
| 50 | FName ConnectedPinName; |
| 51 | if (!IsInputConnected(*InputPin, &FoundGuid, &ConnectedPinName)) |
| 52 | { |
| 53 | return FFlowDataPinResult(EFlowDataPinResolveResult::FailedNotConnected); |
| 54 | } |
| 55 | |
| 56 | const UFlowNode* ConnectedFlowNodeSupplier = GetFlowAsset()->GetNode(FoundGuid); |
| 57 | if (!IsValid(ConnectedFlowNodeSupplier)) |
| 58 | { |
| 59 | checkf(IsValid(ConnectedFlowNodeSupplier), TEXT("This node should be valid if IsInputConnected returned true")); |
| 60 | |
| 61 | return FFlowDataPinResult(EFlowDataPinResolveResult::FailedNotConnected); |
| 62 | } |
| 63 | |
| 64 | // Hand-off to the connected flow node to supply the value |
| 65 | return ConnectedFlowNodeSupplier->TrySupplyDataPin(ConnectedPinName); |
| 66 | } |
nothing calls this directly
no test coverage detected