I’m currently adding to a blueprint node of mine and need to add a second output pin.
I’m using the CreatePin Method to do so, but is expecting the PinSubCategoryObject to be a UObject*
UEdGraphPin* UEdGraphNode::CreatePin(EEdGraphPinDirection Dir, const FString& PinCategory, const FString& PinSubCategory, UObject* PinSubCategoryObject, bool bIsArray, bool bIsReference, const FString& PinName, bool bIsConst /*= false*/, int32 Index /*= INDEX_NONE*/)
Am I right in thinking this will be the output type? If so I want to output an array of FTransforms, how would I implement this?
March 4, 2016, 10:15am
Hi AgentMilkshake1 . If you wanna add more pins
UFUNCTION(BlueprintCallable, Category = Example)
static void MyFunction(ULocalPlayer* LocalPlayer, AActor*& NewActor, FString& message);
& for output pins
It turns out that in the particular place I was trying to output a pin (a class based off of UAnimGraphNode_Base) I had to follow through with some override functions.
For example, I was trying to create an output pin for FPoseLink. To do so I had to add the following to my .cpp.
const UAnimationGraphSchema* Schema = GetDefault<UAnimationGraphSchema>();
CreatePin(EGPD_Output, Schema->PC_Struct, Text("Pose", FPoseLink::StaticStruct(), /*bIsArray=*/ false, /*bIsReference=*/ false, TEXT("Pose"));
I then had to add the override function within my FCustomAnimNode.cpp utilizing the output function that FPoseLink uses. In this case it is a function called
I then placed all of my code the modify the pose as I wanted to, which I won’t cover in detail here, but as long as you have called and override all the correct functions, then it should be good to go (it will output the FPoseContext& Output)