You can use “Blueprint Function Library” class for that. Any subclass of “UObject” can do it, but since Epic added a FunctionLibrary class for that, why not use it…
You only need to do this if your function requires a [FONT=Courier New]UWorld* pointer for something.
Minimal example:
UFUNCTION(BlueprintCallable, meta = (WorldContext="WorldContext"))
static void AwesomeFunction(const UObject* WorldContext)
{
UWorld* World = GEngine->GetWorldFromContextObjectChecked(WorldContext);
// do stuff with World
}
The context object is then set automatically, and won’t show up as an input pin.