Files
integration/Plugins/UEWingman/Source/UEWingman/Public/WingFunctionArgs.h

38 lines
1.1 KiB
C++

#pragma once
#include "CoreMinimal.h"
class UEdGraphNode;
class UK2Node_EditablePinBase;
struct FEdGraphPinType;
struct WingFunctionArgs
{
// Returns true if the node is an EditablePinBase subclass that
// actually supports user-defined pins (FunctionEntry, FunctionResult,
// CustomEvent, or Tunnel).
static bool HasArgs(UEdGraphNode* Node);
// Returns the user-defined pins as a string like "int◦x│float◦y".
static FString GetArgs(UEdGraphNode* Node);
// Sets the user-defined pins from a string like "int◦x│float◦y".
// Returns true on success.
static bool SetArgs(UEdGraphNode* Node, const FString& Args);
private:
// A parsed argument: type + name.
struct FParsedArg
{
FEdGraphPinType PinType;
FName PinName;
};
// Parse "int◦x│float◦y" into an array of FParsedArg.
// Returns false and prints an error on failure.
static bool ParseArgs(const FString& Args, TArray<FParsedArg>& OutArgs);
// Determine the pin direction for user-defined pins on this node.
static EEdGraphPinDirection GetPinDirection(UK2Node_EditablePinBase* Node);
};