I adapted a debug macro from the UE wiki
#define SCREENDEBUG(Format, ...) \
{ \
if (!ensure(GEngine != nullptr)) return; \
const FString Msg = FString::Printf(TEXT(Format), ##__VA_ARGS__); \
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Green, Msg); \
}
void UPuzzlePlatformsGameInstance::Host()
{
SCREENDEBUG("Hosting");
}
void UPuzzlePlatformsGameInstance::Join(const FString& Address) const
{
if (Address == "") return;
SCREENDEBUG("Joining %s", *Address);
}