Multiplayer bugs on 4.12.5

I have a blueprint character based on a C++ character class

when I play in PIE the blueprint character spawns but the PossessedBy Function never gets called in C++ however the blueprint possessed event does gets called

In .h

virtual void PossessedBy(AController * NewController) override;

**In .cpp **

void ALFCharacter::PossessedBy(AController * NewController)
{
	UE_LOG(LogTemp, Warning, TEXT("Posssessed"));
	GEngine->AddOnScreenDebugMessage(-1, 4, FColor::Red, "Posssessed");
	if(IsPlayerControlled())
		SetViewToCamera();
	Super::PossessedBy(NewController);
}

The log strings “Posssessed” is never printed nor are the functions in it ever called
Another thing is the function SetViewToCamera is set to be called in begin play as well but its never called.

.h

UFUNCTION(BlueprintCallable,Client,Reliable,Category="Camera")
void SetViewToCamera();

.cpp

void ALFCharacter::BeginPlay()
{
	GEngine->AddOnScreenDebugMessage(-1, 4, FColor::Red, "call ");
	SetViewToCamera();
	GEngine->AddOnScreenDebugMessage(-1, 4, FColor::Red, "after call ");

}

void ALFCharacter::SetViewToCamera_Implementation()
{

	GEngine->AddOnScreenDebugMessage(-1, 4, FColor::Red, "setview to ");

	APlayerController* APC = Cast<APlayerController>(this->GetController());

	if (APC == nullptr)
	{

		GEngine->AddOnScreenDebugMessage(-1, 4, FColor::Red, "Null Player Controller");
		return;
	}
	else
		GEngine->AddOnScreenDebugMessage(-1, 4, FColor::Green, "Good Player Controller");

		APC->SetViewTargetWithBlend(PlayerCamera);
}

However none of the SetViewToCamera_Implementation logs are printed .

I know I’m calling it correctly because the logs call and after call print alright in begin play but the _Implementation is never called

I tried both dedicated server and standalone on UE4.12.5 to no avail

This is very weird bug , how do I fix this?

Alright so I cornered the reason, which is still a bug, if you have an empty class in the middle of the hierarchy (I kept it as a placeholder to add generalised functionality later) Then the above bugs occur.

The current workaround is to have some custom code in each of the parent classes

Hey Shepard-

I copied the code you provided into a new character class and updated the GameMode.cpp to set my class as the default pawn. When I play in editor I do see the lines for “Set View To” and “Good Player Controller” printed to the screen. Can you explain what you mean by “having an empty class in the hierarchy”?

Hey Shepard-

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

Cheers