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?