Unreal Engine 5 · Blueprint → C++
Custom Event / Function in Unreal Engine 5 C++UE Docs
A Blueprint Custom Event or Function becomes a C++ method marked with UFUNCTION(BlueprintCallable), declared in the header and defined in the .cpp. The BlueprintCallable specifier exposes it so Blueprints can still call it.
Blueprint node & C++ equivalent
// .h
UFUNCTION(BlueprintCallable, Category="Gameplay")
void DoSomething(int32 Amount);
// .cpp
void AMyActor::DoSomething(int32 Amount) { /* ... */ }What does the Custom Event / Function node do?
A Custom Event or Function in Blueprint defines a reusable, callable entry point with its own input pins. You can fire it from anywhere in the graph, and it can take parameters such as an integer amount.
In C++ this is just a member function on your actor class. Marking it UFUNCTION(BlueprintCallable) is what keeps it visible and callable from Blueprint graphs, exactly like the original Custom Event node.
The C++ equivalent
Declare the function in the header with the UFUNCTION macro and define the body in the .cpp: UFUNCTION(BlueprintCallable, Category="Gameplay") void DoSomething(int32 Amount); then void AMyActor::DoSomething(int32 Amount) { /* ... */ }.
The Category="Gameplay" argument controls where the node appears in the Blueprint right-click menu. Use int32 rather than the C++ int keyword so the type matches Unreal's reflection system and Blueprint integer pins.
When to use BlueprintCallable
Use BlueprintCallable when C++ owns the logic but designers still need to trigger it from a graph. If the function never needs to be seen by Blueprint, drop the UFUNCTION macro entirely and keep it a plain C++ method for speed.
If the function only reads data and has no side effects, consider BlueprintPure instead so it appears as a pure node with no execution pins.
Frequently asked questions
How do I call a C++ function from a Blueprint in UE5?+
Mark the function with UFUNCTION(BlueprintCallable) in the header. It then appears in the Blueprint right-click menu under the Category you specified and can be wired into any graph on that class.
What is the difference between BlueprintCallable and BlueprintPure?+
BlueprintCallable creates a node with execution (white) pins for actions that change state. BlueprintPure creates a node with no execution pins, intended for const accessor functions that only return a value.