Native undeclared and non standard syntax to create pointer

Hey guys I just went from version 4.18.3 to 4.19 and now the line Func->SetNativeFunc((Native)&ASGameMode::BeginPlayMutatorHack);
both the engine and VS2017pro compilers now
spit out an couple of errors

(C2065 - Native is undeclared identifier)

and

(C3867 - ASGameMode::BeginPlayMutatorHack non-standard syntax; use & to create pointer to member)

I have been searching the hub but not able to find any infos on the Native class. I have included, engine and coreminimal headers. Any ideas?Thanks in advance.

here is the code in question :

void ASGameMode::InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage)
{
	// HACK: workaround to inject CheckRelevance() into the BeginPlay sequence
	UFunction* Func = AActor::GetClass()->FindFunctionByName(FName(TEXT("ReceiveBeginPlay")));
	Func->FunctionFlags |= FUNC_Native;
	Func->SetNativeFunc((Native)&ASGameMode::BeginPlayMutatorHack);  // ***this line spits out error***

	/* Spawn all mutators. */
	for (int32 i = 0; i < MutatorClasses.Num(); i++)
	{
		AddMutator(MutatorClasses[i]);
	}

	if (BaseMutator)
	{
		BaseMutator->InitGame(MapName, Options, ErrorMessage);
	}

	Super::InitGame(MapName, Options, ErrorMessage);
}


bool ASGameMode::CheckRelevance_Implementation(AActor* Other)
{
	/* Execute the first in the mutator chain */
	if (BaseMutator)
	{
		return BaseMutator->CheckRelevance(Other);
	}

	return true;
}


void ASGameMode::BeginPlayMutatorHack(FFrame& Stack, RESULT_DECL)
{
	P_FINISH;

	// WARNING: This function is called by every Actor in the level during his BeginPlay sequence. Meaning:  'this' is actually an AActor! Only do AActor things!
	if (!IsA(ALevelScriptActor::StaticClass()) && !IsA(ASMutator::StaticClass()) &&
		(RootComponent == NULL || RootComponent->Mobility != EComponentMobility::Static || (!IsA(AStaticMeshActor::StaticClass()) && !IsA(ALight::StaticClass()))))
	{
		ASGameMode* Game = GetWorld()->GetAuthGameMode<ASGameMode>();
		// a few type checks being AFTER the CheckRelevance() call is intentional; want mutators to be able to modify, but not outright destroy
		if (Game != NULL && Game != this && !Game->CheckRelevance((AActor*)this) && !IsA(APlayerController::StaticClass()))
		{
			/* Actors are destroyed if they fail the relevance checks (which moves through the gamemode specific check AND the chain of mutators) */
			Destroy();
		}
	}
}

Also if I comment out the line, the Engine and VS compile without issue, however when I launch a PIE thew engine will crash. If I switch to the base game mode (parent class) the PIE works just fine(minus the added features of the actual game mode), so I am sure this is the root of my issue, any help in finding documentation would be appreciated, thanks again.

The errors come from the gamemode.h/.ccp files after 4.19 some of the method signatures were changed, updating my code to match those sigs fixed the issues, hope this is useful for others doing an update from 4.18.

According to 4.19 update notes…

“Native” (now called “FNativeFuncPtr”)
is now a function pointer that takes a
UObject* context, rather than a
UObject member function pointer. Use
“P_THIS” if you were previously using
the “this” pointer in your native
function.

Original code to:

static void BeginPlayMutatorHack(UObject* Context, FFrame& Stack, RESULT_DECL);

Original code to:

void ASGameMode::BeginPlayMutatorHack(UObject* Context, FFrame& Stack, RESULT_DECL)
{
	P_FINISH;

	// WARNING: This function is called by every Actor in the level during his BeginPlay sequence. Meaning:  'this' is actually an AActor! Only do AActor things!
	if (!P_THIS->IsA(ALevelScriptActor::StaticClass()) && !P_THIS->IsA(ASMutator::StaticClass()) &&
		(P_THIS->RootComponent == NULL || P_THIS->RootComponent->Mobility != EComponentMobility::Static || (!P_THIS->IsA(AStaticMeshActor::StaticClass()) && !P_THIS->IsA(ALight::StaticClass()))))
	{
		ASGameMode* Game = P_THIS->GetWorld()->GetAuthGameMode<ASGameMode>();
		// a few type checks being AFTER the CheckRelevance() call is intentional; want mutators to be able to modify, but not outright destroy
		if (Game != NULL && Game != P_THIS && !Game->CheckRelevance((AActor*)P_THIS) && !P_THIS->IsA(APlayerController::StaticClass()))
		{
			/* Actors are destroyed if they fail the relevance checks (which moves through the gamemode specific check AND the chain of mutators) */
			P_THIS->Destroy();
		}
	}
}

Sorry if my formatting is off. I don’t post often.