MCPcopy Create free account
hub / github.com/MothCocoon/FlowGraph / GetDefaultEntryNode

Method GetDefaultEntryNode

Source/Flow/Private/FlowAsset.cpp:643–664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

641#endif
642
643UFlowNode* UFlowAsset::GetDefaultEntryNode() const
644{
645 UFlowNode* FirstStartNode = nullptr;
646
647 for (const TPair<FGuid, UFlowNode*>& Node : ObjectPtrDecay(Nodes))
648 {
649 if (UFlowNode_Start* StartNode = Cast<UFlowNode_Start>(Node.Value))
650 {
651 if (StartNode->GatherConnectedNodes().Num() > 0)
652 {
653 return StartNode;
654 }
655 else if (FirstStartNode == nullptr)
656 {
657 FirstStartNode = StartNode;
658 }
659 }
660 }
661
662 // If none of the found start nodes have connections, fallback to the first start node we found
663 return FirstStartNode;
664}
665
666#if WITH_EDITOR
667void UFlowAsset::AddCustomInput(const FName& EventName)

Callers

nothing calls this directly

Calls 1

GatherConnectedNodesMethod · 0.80

Tested by

no test coverage detected