Custom UGameViewportClient: call function from blueprint

I have created a custom UGameViewportClient and within it, I have a function called Initialize, that looks like this:

.h

UFUNCTION(BlueprintCallable, Category = "CustomGameViewportClient")
void InitializeCustomGameViewportClient();

.cpp

void UCustomGameViewportClient::InitializeCustomGameViewportClient()
{
		World = GetWorld();
		playerController = World->GetFirstPlayerController();
		myCharacter = UGameplayStatics::GetPlayerCharacter(World, 0);
		initialized = server.Initialize();
}

I cannot call this function from another blueprint because the it requires a target and complains:

This blueprint is not a
CustomGameViewportClient, therefore
Target must have a connection.

I have also tried the Set Timer by Function Name, but the function just never gets called.

How can I call my function?

Figured it out.

UGameViewportClient* gameViewport = GEngine->GameViewport;
((UCustomGameViewportClient*)gameViewport)->InitializeCustomGameViewportClient();

Another way is like this:

UCustomGameViewportClient* gameViewport = Cast<UCustomGameViewportClient>(GEngine->GameViewport);
gameViewport->InitializeCustomGameViewportClient();