I found how to do it for invisible pins but still now how to do it for visible ones:
// Prints a custom error
UFUNCTION(BlueprintCallable, Category = "Custom", meta = (WorldContext = "worldContextObject", ShowWorldContextPin))
static void PrintError(UObject* worldContextObject, const EErrorLocationType ErrorLocType = EErrorLocationType::NameOnly, const FString errorMessage = "Cast failed.");
ShowWorldContextPin does not work and neither does it when putting it in the UCLASS() but at least I can default to self. But I can’t seem to be able to expose the pin VISIBLY.
Seems like im 7 years late, you can specify a default to self pin with meta; instead “ControlledPawn” you can specify your desired variable reference that you want reference to self in declaration of function on UFUNCTION