diff --git a/Source/Flow/Private/FlowAsset.cpp b/Source/Flow/Private/FlowAsset.cpp index 521ed3e3..d46a091d 100644 --- a/Source/Flow/Private/FlowAsset.cpp +++ b/Source/Flow/Private/FlowAsset.cpp @@ -1399,7 +1399,7 @@ FFlowAssetSaveData UFlowAsset::SaveInstance(TArray& SavedFlo GetNodesInExecutionOrder(GetDefaultEntryNode(), NodesInExecutionOrder); for (UFlowNode* Node : NodesInExecutionOrder) { - if (Node && Node->ActivationState == EFlowNodeState::Active) + if (Node && Node->ShouldSave()) { // iterate SubGraphs if (UFlowNode_SubGraph* SubGraphNode = Cast(Node)) diff --git a/Source/Flow/Private/Nodes/FlowNode.cpp b/Source/Flow/Private/Nodes/FlowNode.cpp index 04833927..76a8895d 100644 --- a/Source/Flow/Private/Nodes/FlowNode.cpp +++ b/Source/Flow/Private/Nodes/FlowNode.cpp @@ -991,6 +991,11 @@ void UFlowNode::OnPassThrough_Implementation() Finish(); } +bool UFlowNode::ShouldSave_Implementation() +{ + return GetActivationState() == EFlowNodeState::Active; +} + #if WITH_EDITOR TMap UFlowNode::GetWireRecords() const { diff --git a/Source/Flow/Public/Nodes/FlowNode.h b/Source/Flow/Public/Nodes/FlowNode.h index b9da3469..6f832b7e 100644 --- a/Source/Flow/Public/Nodes/FlowNode.h +++ b/Source/Flow/Public/Nodes/FlowNode.h @@ -368,6 +368,9 @@ class FLOW_API UFlowNode UFUNCTION(BlueprintNativeEvent, Category = "FlowNode") void OnPassThrough(); + + UFUNCTION(BlueprintNativeEvent, Category = "FlowNode") + bool ShouldSave(); ////////////////////////////////////////////////////////////////////////// // Utils