Custom UGameViewportClient: call function from blueprint

anonymous_user_69b87708
Wed, 27 Jan 2016 20:28:04 +0000
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?

2 posts - 1 participant