Blueprint functions without exec pins in Unreal Engine
Blueprint functions without exec pins
There are 2 types of blueprint functions.
Functions with no side-effects
These are colored green in the node editor and do not have exec pins. This means they can always be called and do not change anything internally.
Such a function can be written in c++ as
UFUNCTION(BlueprintPure)
FString MyFunction(int32 MyParameter1);
FString MyFunction(int32 MyParameter1);
Note that these functions must have a return type. The keyword “BlueprintPure” tells that no exec pins are needed.
Functions with side-effects
These are colored blue in the node editor and have exec pins. Means, they need to be put in a sequential workflow to work
Such a function can be written in c++ as
UFUNCTION(BlueprintCallable)
void MyFunction(int32 MyParameter1);
void MyFunction(int32 MyParameter1);
The keyword “BlueprintCallable” tells that exec pins are needed. However, if this does not work, one can also write “BlueprintPure = false” to override the behavior.
Comments
Post a Comment