Add Function to Promotable Operator Nodes

To add a function to these operator nodes, a function must have these things:

  1. The function must be static.

  2. The UFUNCTION must be BlueprintPure.

  3. The UFUNCTION meta must contain CompactNodeTitle = "{Node Title}".

meta = (CompactNodeTitle = "==")
meta = (CompactNodeTitle = "!=")
  1. The function name must start with one of the defined “OperatorNames” in BlueprintTypePromotion.cpp.

namespace OperatorNames
{
	static const FName NoOp			= TEXT("NO_OP");
	static const FName Add			= TEXT("Add");
	static const FName Multiply		= TEXT("Multiply");
	static const FName Subtract		= TEXT("Subtract");
	static const FName Divide		= TEXT("Divide");
	static const FName Greater		= TEXT("Greater");
	static const FName GreaterEq		= TEXT("GreaterEqual");
	static const FName Less			= TEXT("Less");
	static const FName LessEq		= TEXT("LessEqual");
	static const FName NotEq		= TEXT("NotEqual");
	static const FName Equal		= TEXT("EqualEqual");
}

Example

From “OS_RRS_RenderDataLibrary.h”:

UFUNCTION(BlueprintPure, Category = "Osero Suite: Render Results Screen", meta = (DisplayName = "Equal (Render Job)", CompactNodeTitle = "==", Keywords = "== equal"))
	static bool EqualEqual_JobJob(FOS_RRS_JobData A, FOS_RRS_JobData B);
UFUNCTION(BlueprintPure, Category = "Osero Suite: Render Results Screen", meta = (DisplayName = "Not Equal (Render Job)", CompactNodeTitle = "!=", Keywords = "!= not equal"))
	static bool NotEqual_JobJob(FOS_RRS_JobData A, FOS_RRS_JobData B);

More examples can be found in "KismetMathLibrary.h".

Last updated