Why Can I use UEdGraphScema_K2 in CreatePin Function?

Hi, I am learning about creating Dynamic Nodes using K2Node reading source code and seeing documentation .

I knew that CreatePin are used inside of AllocateDefaultPins() and then searching about this CreatePin I knew that there are overload list in this function and inside source code many syntax are written like this :

CreatePin(EGPD_Input,UEdGraphSchema_K2::PC_Exec,UEdGraphSchema_K2::PN_Execute);

I thought that this was one of CreatePin arguments but it seems that there is nothing mentioning about UEdGraphSchema_K2 Constants in any of overload list arguments.
And I wanna know why and how it is possible to use constants and type of arguments that are not declined in function overload argument.

Because those two parameters are just FName references and the values that you’re accessing are static variables of type FName.

For the first one, you’ll always want to use one of the values from the schema as they are the only ones that are supported as a PinCategory.
However the second one is just the pin name and can/should be whatever you want to identify the pins that you create.

1 Like

I could recognize that after seeing syntax of those constant documentation ,and still glad want to say big thanks for the reply

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.