diff --git a/Source/Flow/Private/Nodes/Route/FlowNode_ExecutionMultiGate.cpp b/Source/Flow/Private/Nodes/Route/FlowNode_ExecutionMultiGate.cpp index fb265c9f..0d73c8c1 100644 --- a/Source/Flow/Private/Nodes/Route/FlowNode_ExecutionMultiGate.cpp +++ b/Source/Flow/Private/Nodes/Route/FlowNode_ExecutionMultiGate.cpp @@ -12,11 +12,13 @@ UFlowNode_ExecutionMultiGate::UFlowNode_ExecutionMultiGate() NodeDisplayStyle = FlowNodeStyle::Logic; #endif - FString ResetPinTooltip = TEXT("Finish work of this node."); - ResetPinTooltip += LINE_TERMINATOR; - ResetPinTooltip += TEXT("Calling In input will start triggering output pins once again."); - - InputPins.Add(FFlowPin(TEXT("Reset"), ResetPinTooltip)); + FFlowPin ResetPin(TEXT("Reset")); +#if WITH_EDITORONLY_DATA + ResetPin.PinToolTip = TEXT("Finish work of this node."); + ResetPin.PinToolTip += LINE_TERMINATOR; + ResetPin.PinToolTip += TEXT("Calling In input will start triggering output pins once again."); +#endif + InputPins.Add(ResetPin); SetNumberedOutputPins(0, 1); AllowedSignalModes = {EFlowSignalMode::Enabled, EFlowSignalMode::Disabled}; } diff --git a/Source/Flow/Public/Nodes/FlowPin.h b/Source/Flow/Public/Nodes/FlowPin.h index 3d5f91ed..03ab793e 100644 --- a/Source/Flow/Public/Nodes/FlowPin.h +++ b/Source/Flow/Public/Nodes/FlowPin.h @@ -26,12 +26,20 @@ struct FLOW_API FFlowPin UPROPERTY(EditDefaultsOnly, Category = FlowPin) FName PinName; - /* An optional Display Name, you can use it to override PinName without the need to update graph connections. */ +#if WITH_EDITORONLY_DATA + /* + * Editor Only + * An optional Display Name, you can use it to override PinName without the need to update graph connections. + */ UPROPERTY(EditDefaultsOnly, Category = FlowPin) FText PinFriendlyName; + /* + * Editor Only + */ UPROPERTY(EditDefaultsOnly, Category = FlowPin) FString PinToolTip; +#endif /* Deprecated PinType, use PinTypeName instead (all standard names are defined in FFlowPinTypeNamesStandard). */ UPROPERTY(Meta = (DeprecatedProperty, DeprecationMessage = "Use PinTypeName instead")) @@ -90,16 +98,19 @@ struct FLOW_API FFlowPin : PinName(FName(*FString::FromInt(InPinName))) { } - - explicit FFlowPin(const FStringView InPinName, const FText& InPinFriendlyName) + + explicit FFlowPin(const FStringView InPinName, const FString& InPinTooltip) : PinName(InPinName) - , PinFriendlyName(InPinFriendlyName) +#if WITH_EDITORONLY_DATA + , PinToolTip(InPinTooltip) +#endif { } - - explicit FFlowPin(const FStringView InPinName, const FString& InPinTooltip) + +#if WITH_EDITORONLY_DATA + explicit FFlowPin(const FStringView InPinName, const FText& InPinFriendlyName) : PinName(InPinName) - , PinToolTip(InPinTooltip) + , PinFriendlyName(InPinFriendlyName) { } @@ -130,6 +141,7 @@ struct FLOW_API FFlowPin SetPinTypeName(InTypeName); SetPinSubCategoryObject(OptionalSubCategoryObject); } +#endif explicit FFlowPin(const FName& InPinName, const FFlowPinTypeName& InTypeName, UObject* OptionalSubCategoryObject = nullptr) : PinName(InPinName) @@ -168,8 +180,10 @@ struct FLOW_API FFlowPin // Do a deep pin match (not a simple name-only match), to check if the pins are exactly equal return PinName == Other.PinName && - PinFriendlyName.EqualTo(Other.PinFriendlyName) && +#if WITH_EDITORONLY_DATA + PinFriendlyName.EqualTo(Other.PinFriendlyName) && PinToolTip == Other.PinToolTip && +#endif ContainerType == Other.ContainerType && PinTypeName == Other.PinTypeName && PinSubCategoryObject == Other.PinSubCategoryObject; diff --git a/Source/Flow/Public/Types/FlowDataPinBlueprintLibrary.h b/Source/Flow/Public/Types/FlowDataPinBlueprintLibrary.h index a9592145..a8a30e2f 100644 --- a/Source/Flow/Public/Types/FlowDataPinBlueprintLibrary.h +++ b/Source/Flow/Public/Types/FlowDataPinBlueprintLibrary.h @@ -34,15 +34,21 @@ class UFlowDataPinBlueprintLibrary : public UBlueprintFunctionLibrary UFUNCTION(BlueprintPure, Category = FlowPin, Meta = (BlueprintThreadSafe, DisplayName = "Make Flow Pin")) static UPARAM(DisplayName = "Flow Pin") FFlowPin MakeStruct(FName PinName, FText PinFriendlyName, FString PinToolTip) { +#if WITH_EDITOR return FFlowPin(PinName, PinFriendlyName, PinToolTip); +#else + return FFlowPin(PinName); +#endif } UFUNCTION(BlueprintPure, Category = FlowPin, Meta = (BlueprintThreadSafe, DisplayName = "Break Flow Pin")) static void BreakStruct(UPARAM(DisplayName = "Flow Pin") FFlowPin Ref, FName& OutPinName, FText& OutPinFriendlyName, FString& OutPinToolTip) { OutPinName = Ref.PinName; +#if WITH_EDITOR OutPinFriendlyName = Ref.PinFriendlyName; OutPinToolTip = Ref.PinToolTip; +#endif } /**