| 9 | */ |
| 10 | UENUM(BlueprintType) |
| 11 | enum class EFlowLogVerbosity : uint8 |
| 12 | { |
| 13 | Error UMETA(ToolTip = "Prints a message to console (and log file)"), |
| 14 | Warning UMETA(ToolTip = "Prints a message to console (and log file)"), |
| 15 | Display UMETA(ToolTip = "Prints a message to console (and log file)"), |
| 16 | Log UMETA(ToolTip = "Prints a message to a log file (does not print to console)"), |
| 17 | Verbose UMETA(ToolTip = "Prints a verbose message to a log file (if Verbose logging is enabled for the given category, usually used for detailed logging)"), |
| 18 | VeryVerbose UMETA(ToolTip = "Prints a verbose message to a log file (if VeryVerbose logging is enabled, usually used for detailed logging that would otherwise spam output)"), |
| 19 | }; |
| 20 | |
| 21 | /** |
| 22 | * Adds message to log |
| 23 | * Optionally shows message on screen |
| 24 | */ |
| 25 | UCLASS(NotBlueprintable, meta = (DisplayName = "Log", Keywords = "print")) |
| 26 | class FLOW_API UFlowNode_Log : public UFlowNode_DefineProperties |
| 27 | { |
| 28 | GENERATED_UCLASS_BODY() |
| 29 | |
| 30 | private: |
| 31 | /* The message to write to the log. |
| 32 | * If the Message input pin is not connected to another source. */ |
| 33 | UPROPERTY(EditAnywhere, Category = "Flow", meta = (DefaultForInputFlowPin, FlowPinType = String)) |
| 34 | FString Message; |
| 35 | |
| 36 | UPROPERTY(EditAnywhere, Category = "Flow") |
| 37 | EFlowLogVerbosity Verbosity; |
| 38 | |
| 39 | UPROPERTY(EditAnywhere, Category = "Flow") |
| 40 | bool bPrintToScreen; |
| 41 | |
| 42 | UPROPERTY(EditAnywhere, Category = "Flow", meta = (EditCondition = "bPrintToScreen", EditConditionHides)) |
| 43 | float Duration; |
| 44 | |
| 45 | UPROPERTY(EditAnywhere, Category = "Flow", meta = (EditCondition = "bPrintToScreen", EditConditionHides)) |
| 46 | FColor TextColor; |
| 47 | |
| 48 | protected: |
| 49 | // IFlowCoreExecutableInterface |
| 50 | virtual void ExecuteInput(const FName& PinName) override; |
| 51 | // -- |
| 52 | |
| 53 | #if WITH_EDITOR |
| 54 | public: |
| 55 | // UObject |
| 56 | virtual void PostEditChangeChainProperty(FPropertyChangedChainEvent& PropertyChangedEvent) override; |
| 57 | // -- |
| 58 | |
| 59 | virtual void UpdateNodeConfigText_Implementation() override; |
| 60 | #endif |
| 61 | |
| 62 | public: |
| 63 | EFlowLogVerbosity GetVerbosity() const { return Verbosity; } |
| 64 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected